Skip to content

Commit

Permalink
fix: save dirty files before running pipeline (#918)
Browse files Browse the repository at this point in the history
### Summary of Changes

Save dirty files before running a pipeline. Previously, the last saved
state was executed.
  • Loading branch information
lars-reimann authored Feb 24, 2024
1 parent b9d3641 commit 4302ca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/safe-ds-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"menus": {
"editor/title/run": [
{
"command": "extension.safe-ds.runPipelineFile",
"command": "safe-ds.runPipelineFile",
"when": "resourceLangId == safe-ds",
"group": "navigation@1"
}
Expand All @@ -133,7 +133,7 @@
},
"commands": [
{
"command": "extension.safe-ds.runPipelineFile",
"command": "safe-ds.runPipelineFile",
"title": "Run Pipeline",
"category": "Safe-DS",
"icon": "$(play)"
Expand Down
5 changes: 2 additions & 3 deletions packages/safe-ds-vscode/src/extension/mainClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ const registerVSCodeCommands = function (context: vscode.ExtensionContext) {
});
};

context.subscriptions.push(
vscode.commands.registerCommand('extension.safe-ds.runPipelineFile', commandRunPipelineFile),
);
context.subscriptions.push(vscode.commands.registerCommand('safe-ds.runPipelineFile', commandRunPipelineFile));

context.subscriptions.push(
registerCommandWithCheck('safe-ds.runEdaFromContext', () => {
Expand Down Expand Up @@ -344,6 +342,7 @@ const runPipelineFile = async function (filePath: vscode.Uri | undefined, pipeli
};

const commandRunPipelineFile = async function (filePath: vscode.Uri | undefined) {
await vscode.workspace.saveAll();
await runPipelineFile(filePath, crypto.randomUUID());
};

Expand Down

0 comments on commit 4302ca6

Please sign in to comment.