@alanbem/dclaude 0.0.10 → 0.0.11

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 +10 -8
  2. package/package.json +1 -1
package/dclaude CHANGED
@@ -955,13 +955,15 @@ detect_tty_flags() {
955
955
  echo "$tty_flags"
956
956
  }
957
957
 
958
- # Check if Claude is being run in print mode (-p/--print)
959
- # This checks arguments as separate array elements, so -p inside a string won't match
960
- is_print_mode() {
958
+ # Check if Claude is being run in a mode that should skip tmux
959
+ # These are flags that just output something and exit (no interactive session)
960
+ should_skip_tmux() {
961
961
  for arg in "$@"; do
962
- if [[ "$arg" == "-p" ]] || [[ "$arg" == "--print" ]]; then
963
- return 0
964
- fi
962
+ case "$arg" in
963
+ -p|--print|--version|-v|--help|-h)
964
+ return 0
965
+ ;;
966
+ esac
965
967
  done
966
968
  return 1
967
969
  }
@@ -1144,7 +1146,7 @@ main() {
1144
1146
  fi
1145
1147
 
1146
1148
  # Check if interactive (TTY available) and not in print mode
1147
- if [[ -n "$tty_flags" ]] && ! is_print_mode "${claude_args[@]}" "$@"; then
1149
+ if [[ -n "$tty_flags" ]] && ! should_skip_tmux "${claude_args[@]}" "$@"; then
1148
1150
  # Interactive and not print mode - use tmux for session management
1149
1151
  local tmux_session
1150
1152
  if [[ -n "${DCLAUDE_TMUX_SESSION:-}" ]]; then
@@ -1291,7 +1293,7 @@ main() {
1291
1293
  docker exec -u root "$container_name" /usr/local/bin/docker-entrypoint.sh true >/dev/null 2>&1 || true
1292
1294
 
1293
1295
  # Check if interactive (TTY available) and not in print mode
1294
- if [[ -n "$tty_flags" ]] && ! is_print_mode "${claude_args[@]}" "$@"; then
1296
+ if [[ -n "$tty_flags" ]] && ! should_skip_tmux "${claude_args[@]}" "$@"; then
1295
1297
  # Interactive and not print mode - use tmux for session management
1296
1298
  local tmux_session
1297
1299
  if [[ -n "${DCLAUDE_TMUX_SESSION:-}" ]]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanbem/dclaude",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Dockerized Claude Code CLI launcher with MCP support",
5
5
  "main": "dclaude",
6
6
  "bin": {