Skip to content

Conversation

@fmzchao
Copy link

@fmzchao fmzchao commented Jan 22, 2026

Summary

  • Fix Docker -t flag removal from filtering command arguments

The PTY fallback code in runner.ts used filter(arg => arg !== '-t') which removed ALL occurrences of -t from the docker args array, including command arguments like findomain -t example.com.

This caused tools that use -t as a parameter to fail with errors like:

error: Found argument 'example.com' which wasn't expected, or isn't valid in this context
USAGE: findomain [FLAGS] [OPTIONS]

Solution: Only remove the first occurrence of -t within the first 10 args (where Docker flags are located), preserving any -t in the actual command arguments.

Testing

  • bun run test
  • bun run lint
  • bun run typecheck
  • Additional notes: Tested with Findomain component which uses -t flag for target specification. Before the fix, the -t was stripped and the command failed. After the fix, the command executes correctly.

Documentation

  • No documentation updates needed - this is a bug fix

…mand arguments

The PTY fallback code used filter(arg => arg !== '-t') which removed ALL
occurrences of '-t' from the docker args array, including command arguments
like 'findomain -t example.com'. This caused tools that use -t as a parameter
to fail with 'argument not expected' errors.

Fixed by only removing the first occurrence of -t within the first 10 args
(where Docker flags are located), preserving any -t in the actual command.

Signed-off-by: fmzchao <root@7jdg.com>
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant