Guard the cwd change for gui only

This commit is contained in:
Marek Roszko 2025-01-04 19:25:05 -05:00
parent 4dfedf4fb4
commit cb948302e2

View File

@ -946,7 +946,8 @@ bool SETTINGS_MANAGER::LoadProject( const wxString& aFullPath, bool aSetActive )
wxFileName projectPath( fullPath );
wxSetEnv( PROJECT_VAR_NAME, projectPath.GetPath() );
if( !projectPath.GetPath().IsEmpty() )
// set the cwd but don't impact kicad-cli
if( !projectPath.GetPath().IsEmpty() && Pgm().IsGUI() )
wxSetWorkingDirectory( projectPath.GetPath() );
}