Skip to content

Commit

Permalink
Updated to cd to the sim directory after sourcing a config file in ca…
Browse files Browse the repository at this point in the history
…se the config file changed pwd.
  • Loading branch information
hchen99 committed Sep 11, 2024
1 parent e2c35d3 commit 60e3144
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trick_source/sim_services/MasterSlave/Master.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ int Trick::SlaveInfo::start() {
/** @li Set up remote shell environment if needed for the remote startup command */
if ( !remote_shell_config_file.empty() ) {
startup_command << " source " << remote_shell_config_file << " ; " ;
// cd to sim_path directory again if in case the config file changed pwd
// to a different directory other than the sim_path
startup_command << " cd " << sim_path << " ; " ;
}

if (strstr(passp->pw_shell, "csh")) {
Expand Down

0 comments on commit 60e3144

Please sign in to comment.