8000 Merge pull request #19 from arduino/fix/update-cli-getfile · arduino/micropython.js@d0c7723 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0c7723

Browse files
authored
Merge pull request #19 from arduino/fix/update-cli-getfile
Updated cli.js getFile method to leverage binary transfer.
2 parents 202aa1b + 1db1b60 commit d0c7723

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ const getFile = (args, port, dataConsumer) => {
140140
return board.open(port)
141141
.then(async () => {
142142
try {
143-
let output = await board.fs_cat(boardFilename, consumer)
143+
let output = await board.fs_cat_binary(boardFilename, consumer)
144+
output = Buffer.from(output);
144145
fs.writeFileSync(diskFilename, output)
145146
log('output')
146147
log(output)

0 commit comments

Comments
 (0)
0