Skip to content

Commit

Permalink
fix(commands): show warning when you run a Aurelia-CLI command in a n…
Browse files Browse the repository at this point in the history
…on Aurelia-CLI project
  • Loading branch information
erik-lieben committed Nov 21, 2016
1 parent 672c5bd commit 2eec465
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
15 changes: 12 additions & 3 deletions dist/src/client/aureliaCLICommands.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/client/aureliaCLICommands.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/client/aureliaCLICommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ export default class AureliaCliCommands {
this.showOutput(outputChannel);
}

private static runCommandInTerminal(args: string[]): void {
private static async runCommandInTerminal(args: string[]): Promise<void> {

try {
fs.accessSync(path.join(vscode.workspace.rootPath, 'aurelia_project/aurelia.json'));
} catch (e) {
vscode.window.showErrorMessage(`Unable to find 'aurelia_project/aurelia.json'. Are you sure you are in the correct directory?`);
return;
}

let terminal = vscode.window.createTerminal('aurelia-cli');
terminal.show(true);
Expand Down

0 comments on commit 2eec465

Please sign in to comment.