@alanbem/dclaude 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dclaude +11 -5
  2. package/package.json +1 -1
package/dclaude CHANGED
@@ -817,16 +817,22 @@ handle_git_auth() {
817
817
  }
818
818
 
819
819
  # Detect TTY availability and return appropriate Docker flags
820
+ # Detect TTY status early (before any subshells)
821
+ # Must be done at script top-level since $() subshells don't inherit TTY
822
+ STDIN_IS_TTY=false
823
+ STDOUT_IS_TTY=false
824
+ [[ -t 0 ]] && STDIN_IS_TTY=true
825
+ [[ -t 1 ]] && STDOUT_IS_TTY=true
826
+
820
827
  detect_tty_flags() {
821
828
  local tty_flags=""
822
829
 
823
- # Check if stdin is a TTY
824
- if [[ -t 0 ]]; then
830
+ # Use pre-detected TTY status (can't detect inside subshell)
831
+ if [[ "$STDIN_IS_TTY" == "true" ]]; then
825
832
  tty_flags="-i"
826
833
  fi
827
834
 
828
- # Check if stdout is a TTY
829
- if [[ -t 1 ]]; then
835
+ if [[ "$STDOUT_IS_TTY" == "true" ]]; then
830
836
  tty_flags="${tty_flags} -t"
831
837
  fi
832
838
 
@@ -834,7 +840,7 @@ detect_tty_flags() {
834
840
  tty_flags=$(echo $tty_flags | xargs)
835
841
 
836
842
  if [[ "$DEBUG" == "true" ]]; then
837
- debug "TTY detection: stdin=$(test -t 0 && echo yes || echo no), stdout=$(test -t 1 && echo yes || echo no)"
843
+ debug "TTY detection: stdin=$STDIN_IS_TTY, stdout=$STDOUT_IS_TTY"
838
844
  debug "TTY flags: ${tty_flags:-none}"
839
845
  fi
840
846
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanbem/dclaude",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Dockerized Claude Code CLI launcher with MCP support",
5
5
  "main": "dclaude",
6
6
  "bin": {