Skip to content

Commit d60e41b

Browse files
committed
attempt for fix
1 parent 3600f04 commit d60e41b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/client/terminals/codeExecution/codeExecutionManager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ export class CodeExecutionManager implements ICodeExecutionManager {
131131
return;
132132
}
133133

134+
const fileAfterSave = await codeExecutionHelper.saveFileIfDirty(fileToExecute);
135+
if (fileAfterSave) {
136+
fileToExecute = fileAfterSave;
137+
}
138+
134139
// Check on setting terminal.executeInFileDir
135140
const pythonSettings = this.configSettings.getSettings(file);
136141
let cwd = pythonSettings.terminal.executeInFileDir ? path.dirname(fileToExecute.fsPath) : undefined;
@@ -139,11 +144,6 @@ export class CodeExecutionManager implements ICodeExecutionManager {
139144
const launchArgs = pythonSettings.terminal.launchArgs;
140145
const totalArgs = [...launchArgs, fileToExecute.fsPath.fileToCommandArgumentForPythonExt()];
141146

142-
const fileAfterSave = await codeExecutionHelper.saveFileIfDirty(fileToExecute);
143-
if (fileAfterSave) {
144-
fileToExecute = fileAfterSave;
145-
}
146-
147147
const show = this.shouldTerminalFocusOnStart(fileToExecute);
148148
let terminal: Terminal | undefined;
149149
if (dedicated) {

0 commit comments

Comments
 (0)