fix: define original_cwd before use in launch_command finally block#2965
fix: define original_cwd before use in launch_command finally block#2965
Conversation
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
Repo Guardian - PassedNo ephemeral content detected. All changed files are durable project code.
|
e664e4e to
97583c4
Compare
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
The finally block in launch_command() referenced original_cwd to restore the working directory after staging, but the variable was never defined in that function's scope, causing a NameError on session shutdown. Capture os.getcwd() before _common_launcher_startup() runs, since that function may change the CWD during auto-staging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1941624 to
4cc544e
Compare
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
Problem
launch_command()incli.pyhas afinallyblock that referencesoriginal_cwdto restore the working directory after staging, but the variable was never defined in that function's scope. This causes aNameErroron every session shutdown:Fix
Capture
os.getcwd()at the top oflaunch_command(), before_common_launcher_startup()runs (which may change the CWD during auto-staging).Testing