Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support overriding config's command through CLI args #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akerouanton
Copy link
Contributor

Commit ab25958 added support for oneliners, but it marked the 'command' arg as conflicting with the 'config' arg. This prevents using a config file with go run|test -exec.

Moreover, having a way to override the command defined in the config file gives an easy way to exec into a VM to manually debug a failing command.

@akerouanton akerouanton marked this pull request as ready for review November 18, 2024 10:24
Copy link
Owner

@danobi danobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR!

src/main.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
@akerouanton akerouanton force-pushed the override-command branch 2 times, most recently from 786c5a5 to 01247df Compare November 25, 2024 19:53
Commit ab25958 added support for oneliners, but it marked the 'command'
arg as conflicting with the 'config' arg. This prevents using a config
file with `go run|test -exec`.

Moreover, having a way to override the command defined in the config
file gives an easy way to exec into a VM to manually debug a failing
command.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
@danobi
Copy link
Owner

danobi commented Nov 27, 2024

Looks like if there are multiple targets in a config file and you also provide a command override via CLI, then all commands in the config will be overridden.

I'm wondering if that makes sense. WDYT about only allowing it if there's a single target in the config after filtering? That seems like it'd be less ambiguous.

@akerouanton
Copy link
Contributor Author

I'm wondering if that makes sense. WDYT about only allowing it if there's a single target in the config after filtering? That seems like it'd be less ambiguous.

I was assuming that the filter arg should always yield a single target. I'm not sure to see how it works when it yields multiple targets. I'll need to play a bit with it, but that seems like a fair point.

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.

2 participants