mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +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) => {
|
}, (error) => {
|
||||||
debug(`Got ${error.message} when reading a command, assuming everything is done`)
|
debug(`Got ${error.message} when reading a command, assuming everything is done`)
|
||||||
return {
|
return {
|
||||||
command: protocol.FILE_MESSAGE_COMMAND_DONE
|
command: protocol.FILE_MESSAGE_COMMANDS.DONE
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
.then((fileMessage) => {
|
.then((fileMessage) => {
|
||||||
debug(`Received message: ${fileMessage.command} -> ${fileMessage.fileName}`)
|
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')
|
debug('Done')
|
||||||
return Bluebird.resolve()
|
return Bluebird.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
return Bluebird.try(() => {
|
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}`)
|
debug(`Getting the size of ${fileMessage.fileName}`)
|
||||||
const fileSize = _.get(files, [ fileMessage.fileName, 'length' ])
|
const fileSize = _.get(files, [ fileMessage.fileName, 'length' ])
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ const startFileServer = (device, endpoint, files) => {
|
|||||||
return protocol.sendBufferSize(device, fileSize)
|
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}`)
|
debug(`Reading ${fileMessage.fileName}`)
|
||||||
const fileBuffer = _.get(files, [ fileMessage.fileName ])
|
const fileBuffer = _.get(files, [ fileMessage.fileName ])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user