feat: 优化跨平台路径解析并修复引号拼接 Bug

This commit is contained in:
yczpf2019
2026-01-24 16:02:28 +08:00
parent 0bdd6b4dc6
commit d5aa1c6c8c
4 changed files with 28 additions and 32 deletions

View File

@@ -12,7 +12,7 @@ export default class ShellMicroPython extends Shell {
async burn(config) {
const info = {
indexPath: path.resolve(CLIENT_PATH, config.boardDirPath),
esptool: `${PYTHON.path.cli}" "${MICROPYTHON.path.esptool}`,
esptool: `"${PYTHON.path.cli}" "${MICROPYTHON.path.esptool}`,
com: config.port
};
const command = MString.tpl(config.command, info);
@@ -22,7 +22,7 @@ export default class ShellMicroPython extends Shell {
async upload(config) {
const info = {
indexPath: path.resolve(CLIENT_PATH, config.boardDirPath),
ampy: `${PYTHON.path.cli}" "${MICROPYTHON.path.ampy}`,
ampy: `"${PYTHON.path.cli}" "${MICROPYTHON.path.ampy}`,
com: config.port
};
const command = MString.tpl(config.command, info);