Skip to content

Commit

Permalink
fix(embark/dashboard): show command in the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
jrainville authored and iurimatias committed Mar 13, 2019
1 parent 6f5efb1 commit 54698cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/embark/src/lib/core/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ class Engine {
version: this.version,
ipc: this.ipc,
logger: this.logger,
config: this.config
config: this.config,
useDashboard: this.useDashboard
});
}

Expand Down
5 changes: 5 additions & 0 deletions packages/embark/src/lib/modules/console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Console {
private cmdHistoryFile: string;
private suggestions?: Suggestions;
private providerReady: boolean;
private useDashboard: boolean;

constructor(embark: Embark, options: any) {
this.embark = embark;
Expand All @@ -40,6 +41,7 @@ class Console {
this.fs = embark.fs;
this.ipc = options.ipc;
this.config = options.config;
this.useDashboard = options.useDashboard;
this.history = [];
this.cmdHistoryFile = options.cmdHistoryFile || this.fs.dappPath(".embark", "cmd_history");
this.providerReady = false;
Expand Down Expand Up @@ -151,6 +153,9 @@ class Console {
return this.ipc.request("console:executeCmd", cmd, callback);
}

if (this.useDashboard) {
this.logger.info("console > ".cyan + cmd.white);
}
if (!(cmd.split(" ")[0] === "history" || cmd === __("history"))) {
this.saveHistory(cmd);
}
Expand Down

0 comments on commit 54698cc

Please sign in to comment.