Skip to content

Commit

Permalink
Fix return Promises so each step runs in sequence
Browse files Browse the repository at this point in the history
Return the Promise of each executeCommand() call to PromiseSeries, so that commands are executed in sequence, not in parallel.
  • Loading branch information
xoob authored May 3, 2017
1 parent 320c961 commit de2633d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ function loadMacros(context) {
series.add(() => {
// support objects so that we can pass arguments from user settings to the commands
if (typeof action === "object"){
vscode.commands.executeCommand(action.command, action.args);
return vscode.commands.executeCommand(action.command, action.args);
}
// support commands as strings (no args)
else{
vscode.commands.executeCommand(action);
return vscode.commands.executeCommand(action);
}
})
})
Expand Down

0 comments on commit de2633d

Please sign in to comment.