Skip to content

Commit b220a0c

Browse files
committed
show msg box when xpack toolchain not be installed
1 parent 5c9b313 commit b220a0c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/EIDEProject.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,12 +2877,20 @@ $(OUT_DIR):
28772877
}
28782878
}
28792879
} catch (error) {
2880+
GlobalEvent.log_warn(<Error>error);
28802881
const msg = [
28812882
`${toolchain.getToolchainPrefix()}gcc not avaliable:\n${(<Error>error).message}`,
28822883
`Please check your package.json and run 'xpm install' to install xpack dependences.`
28832884
].join(os.EOL);
2884-
GlobalEvent.emit('msg', newMessage('Error', msg));
2885-
GlobalEvent.log_warn(<Error>error);
2885+
vscode.window.showErrorMessage(msg, 'Install', 'Later')
2886+
.then((value) => {
2887+
if (value == 'Install') {
2888+
runShellCommand('xpm install', 'xpm install', {
2889+
useTerminal: true,
2890+
cwd: this.getRootDir().path
2891+
});
2892+
}
2893+
});
28862894
return false
28872895
}
28882896
}

0 commit comments

Comments
 (0)