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

Handle paths in nerdctl compose subcommands #1332

Closed
wants to merge 2 commits into from

Conversation

ericpromislow
Copy link
Contributor

Some of the commands have a 3-level structure:
nerdctl COMMAND options.... SUBCOMMAND options...

This change will WSL-convert paths that appear in the second set
of options.

Signed-off-by: Eric Promislow [email protected]

@ericpromislow ericpromislow requested a review from mook-as January 26, 2022 01:28
@ericpromislow ericpromislow linked an issue Jan 26, 2022 that may be closed by this pull request
Copy link
Contributor

@mook-as mook-as left a comment

Choose a reason for hiding this comment

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

In general, I think it would be much better to fix the generator to not generate options for subcommands that are inherited from the parent command.

Comment on lines 281 to 282
subcommands := []string{"build", "config", "down", "kill", "logs", "ps", "pull", "push", "up"}
for _, sc := range subcommands {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
subcommands := []string{"build", "config", "down", "kill", "logs", "ps", "pull", "push", "up"}
for _, sc := range subcommands {
for _, sc := range []string{"build", "config", "down", "kill", "logs", "ps", "pull", "push", "up"} {

We never use the slice for anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

src/go/nerdctl-stub/parse_args.go Outdated Show resolved Hide resolved
Some of the commands have a 3-level structure:
`nerdctl COMMAND options.... SUBCOMMAND options...`

This change will WSL-convert paths that appear in the second set
of options.

Signed-off-by: Eric Promislow <[email protected]>
@ericpromislow ericpromislow force-pushed the 1213-process-subcommand-args branch from b0f35b0 to ef88a07 Compare January 28, 2022 21:19
@ericpromislow ericpromislow requested a review from mook-as January 28, 2022 21:19
@ericpromislow
Copy link
Contributor Author

Subsumed by #1355

@jandubois jandubois deleted the 1213-process-subcommand-args branch May 21, 2022 00:40
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.

Nerdctl can't find .env file
2 participants