Fix browser download (#706)
This commit is contained in:
parent
d128dad3dc
commit
a99f0212ac
@ -60,7 +60,7 @@ const rbfTemplate = `
|
||||
4c45474f580000006d000100000000001c000000000000000e000000821b038405018130813e8053
|
||||
74617274696e672e2e2e0084006080XX00448581644886488405018130813e80427965210084000a
|
||||
`
|
||||
export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
|
||||
export function deployCoreAsync(resp: pxtc.CompileResult) {
|
||||
let w: pxt.editor.Ev3Wrapper
|
||||
|
||||
let filename = resp.downloadFileBaseName || "pxt"
|
||||
@ -101,7 +101,7 @@ export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
|
||||
if (pxt.commands && pxt.commands.electronDeployAsync) {
|
||||
return pxt.commands.electronDeployAsync(resp);
|
||||
}
|
||||
if (!isCli && pxt.commands && pxt.commands.saveOnlyAsync) {
|
||||
if (pxt.commands && pxt.commands.saveOnlyAsync) {
|
||||
return pxt.commands.saveOnlyAsync(resp);
|
||||
}
|
||||
return Promise.resolve();
|
||||
@ -121,10 +121,7 @@ export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
|
||||
.then(() => w.flashAsync(rbfPath, rbfBIN))
|
||||
.then(() => w.runAsync(rbfPath))
|
||||
.then(() => {
|
||||
if (isCli)
|
||||
return w.disconnectAsync()
|
||||
else
|
||||
return Promise.resolve()
|
||||
//return Promise.delay(1000).then(() => w.dmesgAsync())
|
||||
}).catch(e => {
|
||||
// if we failed to initalize, retry
|
||||
|
Loading…
Reference in New Issue
Block a user