Skip to content

Commit de2633d

Browse files
authored
Fix return Promises so each step runs in sequence
Return the Promise of each executeCommand() call to PromiseSeries, so that commands are executed in sequence, not in parallel.
1 parent 320c961 commit de2633d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ function loadMacros(context) {
3131
series.add(() => {
3232
// support objects so that we can pass arguments from user settings to the commands
3333
if (typeof action === "object"){
34-
vscode.commands.executeCommand(action.command, action.args);
34+
return vscode.commands.executeCommand(action.command, action.args);
3535
}
3636
// support commands as strings (no args)
3737
else{
38-
vscode.commands.executeCommand(action);
38+
return vscode.commands.executeCommand(action);
3939
}
4040
})
4141
})

0 commit comments

Comments
 (0)