mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
fix(sdk): usbboot command typos (#1758)
Change-type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
parent
179597b86f
commit
f7b0291bf8
@ -245,20 +245,20 @@ const startFileServer = (device, endpoint, files) => {
|
||||
}, (error) => {
|
||||
debug(`Got ${error.message} when reading a command, assuming everything is done`)
|
||||
return {
|
||||
command: protocol.FILE_MESSAGE_COMMAND_DONE
|
||||
command: protocol.FILE_MESSAGE_COMMANDS.DONE
|
||||
}
|
||||
})
|
||||
|
||||
.then((fileMessage) => {
|
||||
debug(`Received message: ${fileMessage.command} -> ${fileMessage.fileName}`)
|
||||
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMAND_DONE) {
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMANDS.DONE) {
|
||||
debug('Done')
|
||||
return Bluebird.resolve()
|
||||
}
|
||||
|
||||
return Bluebird.try(() => {
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMAND_GET_FILE_SIZE) {
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMANDS.GET_FILE_SIZE) {
|
||||
debug(`Getting the size of ${fileMessage.fileName}`)
|
||||
const fileSize = _.get(files, [ fileMessage.fileName, 'length' ])
|
||||
|
||||
@ -272,7 +272,7 @@ const startFileServer = (device, endpoint, files) => {
|
||||
return protocol.sendBufferSize(device, fileSize)
|
||||
}
|
||||
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMAND_READ_FILE) {
|
||||
if (fileMessage.command === protocol.FILE_MESSAGE_COMMANDS.READ_FILE) {
|
||||
debug(`Reading ${fileMessage.fileName}`)
|
||||
const fileBuffer = _.get(files, [ fileMessage.fileName ])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user