Support for latest 3.0 run command

This commit is contained in:
Geequlim
2017-08-29 21:38:29 +08:00
parent 58203708ba
commit 4b3282cf03

View File

@@ -171,8 +171,12 @@ class ToolManager {
if (fs.existsSync(cfg) && fs.statSync(cfg).isFile())
workspaceValid = true;
}
if (workspaceValid)
this.runEditor(`-path ${this.workspaceDir} ${params}`);
if (workspaceValid) {
let pathFlag = "-path";
if (vscode.workspace.getConfiguration("GodotTools").get("godotVersion", 2.1) >= 3)
pathFlag = "--path";
this.runEditor(`${pathFlag} ${this.workspaceDir} ${params}`);
}
else
vscode.window.showErrorMessage("Current workspace is not a godot project");
}
@@ -246,4 +250,4 @@ class ToolManager {
}
};
export default ToolManager;
export default ToolManager;