mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-07 11:26:41 +00:00
Handle ENOENT windows errors
This commit is contained in:
parent
00623833cc
commit
e9e02e3272
@ -92,4 +92,11 @@ exports.writeImage = (devicePath, imagePath, options = {}, callback = _.noop) ->
|
||||
if error.code is 'EBUSY'
|
||||
error.message = "Try umounting #{error.path} first."
|
||||
|
||||
if error.code is 'ENOENT'
|
||||
error.message = "Invalid device #{error.path}"
|
||||
|
||||
# Prevents outer handler to take
|
||||
# it as an usual ENOENT error
|
||||
delete error.code
|
||||
|
||||
return callback(error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user