From de2633df8bb5ab0042fe0f0ebe15e40da1fe16fa Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Wed, 3 May 2017 10:58:47 +0200 Subject: [PATCH] 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. --- extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.js b/extension.js index 8d0e940..fe444b7 100644 --- a/extension.js +++ b/extension.js @@ -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); } }) })