Merge branch 'master' into data-logging-doc

This commit is contained in:
Galen Nickel 2017-10-17 17:01:45 -07:00 committed by GitHub
commit 5005bddd02
2 changed files with 13 additions and 9 deletions

View File

@ -222,13 +222,9 @@ namespace pxt.editor {
})
}
export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false): Promise<void> {
export function deployCoreAsync(resp: pxtc.CompileResult, d: pxt.commands.DeployOptions = {}): Promise<void> {
let saveHexAsync = () => {
if (isCli) {
return Promise.resolve()
} else {
return pxt.commands.saveOnlyAsync(resp)
}
return pxt.commands.saveOnlyAsync(resp)
}
startTime = 0
@ -331,8 +327,16 @@ namespace pxt.editor {
return wrap.cortexM.reset(false)
})
})
.catch(e => {
return saveHexAsync();
.catch(e => {
if (e.type === "devicenotfound" && d.reportError) {
if (d.reportError) {
d.reportError(Util.lf("Please connect your device."))
} else {
console.error(e)
}
} else {
saveHexAsync()
}
})
}

View File

@ -38,6 +38,6 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-core": "0.14.5"
"pxt-core": "0.14.7"
}
}