File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,9 +124,7 @@ const getFile = (args, port) => {
124
124
. then ( async ( ) => {
125
125
try {
126
126
let output = await board . fs_cat ( boardFilename )
127
- output = output . split ( 'raw REPL; CTRL-B to exit\r\n>OK' )
128
- const content = output [ 1 ] . slice ( 0 , - 1 )
129
- fs . writeFileSync ( diskFilename , content )
127
+ fs . writeFileSync ( diskFilename , output )
130
128
} catch ( e ) {
131
129
console . log ( 'error' , e )
132
130
}
Original file line number Diff line number Diff line change @@ -235,7 +235,9 @@ class MicroPythonBoard {
235
235
command : `with open('${ filePath } ', 'r') as f:\n while 1:\n b=f.read(256)\n if not b:break\n print(b,end='')`
236
236
} )
237
237
await this . exit_raw_repl ( )
238
- return Promise . resolve ( output )
238
+ const outputArray = output . split ( 'raw REPL; CTRL-B to exit\r\n>OK' )
239
+ const content = outputArray [ 1 ] . slice ( 0 , - 1 )
240
+ return Promise . resolve ( content )
239
241
}
240
242
return Promise . reject ( new Error ( `Path to file was not specified` ) )
241
243
}
You can’t perform that action at this time.
0 commit comments