diff --git a/lib/script-runner-process.coffee b/lib/script-runner-process.coffee index 5234a22..2b6ae39 100644 --- a/lib/script-runner-process.coffee +++ b/lib/script-runner-process.coffee @@ -34,9 +34,8 @@ class ScriptRunnerProcess cwd = Path.dirname(editor.getPath()) # Save the file if it has been modified: - editor.save() - - callback(editor.getPath(), cwd) + Promise.resolve(editor.save()).then => + callback(editor.getPath(), cwd) return true