tao-shen Claude Opus 4.6 commited on
Commit
0fd7ea3
·
1 Parent(s): 74dd2e2

fix: skip PS1 override when Cursor/VSCode shell integration is active

Browse files

The /etc/profile.d/huggingrun.sh was unconditionally overwriting PS1,
which clobbered the OSC escape sequences that Cursor injects for
command boundary detection, causing "Waiting for output" on all commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. entrypoint.py +5 -1
entrypoint.py CHANGED
@@ -460,10 +460,14 @@ def setup_motd():
460
  sh("chown tao-shen:tao-shen /home/tao-shen/.sudo_as_admin_successful")
461
 
462
  # Set PS1 with custom hostname (Docker container hostname is unreadable)
 
 
463
  profile = (
464
  '#!/bin/bash\n'
465
- 'export PS1="\\[\\e[1;32m\\]\\u\\[\\e[0m\\]@\\[\\e[1;36m\\]huggingrun'
 
466
  '\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]\\$ "\n'
 
467
  )
468
  with open("/etc/profile.d/huggingrun.sh", "w") as f:
469
  f.write(profile)
 
460
  sh("chown tao-shen:tao-shen /home/tao-shen/.sudo_as_admin_successful")
461
 
462
  # Set PS1 with custom hostname (Docker container hostname is unreadable)
463
+ # Skip PS1 override when VS Code/Cursor shell integration is active,
464
+ # as it injects OSC markers into PS1 for command detection.
465
  profile = (
466
  '#!/bin/bash\n'
467
+ 'if [ -z "$VSCODE_SHELL_INTEGRATION" ]; then\n'
468
+ ' export PS1="\\[\\e[1;32m\\]\\u\\[\\e[0m\\]@\\[\\e[1;36m\\]huggingrun'
469
  '\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]\\$ "\n'
470
+ 'fi\n'
471
  )
472
  with open("/etc/profile.d/huggingrun.sh", "w") as f:
473
  f.write(profile)