File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/client/terminals/codeExecution Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments