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

cmd/root: Wire root command to 'enter' command #811

Merged

Conversation

HarryMichal
Copy link
Member

One of requirements to get Toolbox to RHEL is to make the root command
('toolbox') have similar functionality as 'toolbox enter'.

Making 'toolbox' behave exactly the same as 'toolbox enter', making it
effectively an alias is not exactly desirable as the root command has
its own behaviour too. Instead, toolbox only translates to toolbox enter when no arguments or flags (excluding the global ones) are
provided.

@HarryMichal HarryMichal added 6. Major Change May cause breakage 2. CLI Issue is related to the command line interface 3. New Feature New feature labels Jun 25, 2021
@HarryMichal HarryMichal added this to the Release 0.1.0 milestone Jun 25, 2021
@softwarefactory-project-zuul
Copy link

Build failed.

src/cmd/root.go Outdated Show resolved Hide resolved
src/cmd/run.go Outdated Show resolved Hide resolved
src/cmd/root.go Outdated Show resolved Hide resolved
src/cmd/root.go Outdated Show resolved Hide resolved
This makes 'toolbox', without any commands specified, behave a lot like
'toolbox enter'. When there aren't any toolbox containers, it will
offer to create a new container matching the same parameters passed to
the command. If there's just one toolbox container available, then it
will fall back to it.

This makes the command line interface a lot similar to that of
github.com/coreos/toolbox, which makes things easier for those
switching over from it.

Some changes by Debarshi Ray.

containers#811
@debarshiray debarshiray force-pushed the cmd/root/wire-toolbox-to-enter branch from e8c2caf to 6c86cab Compare June 29, 2021 13:37
@debarshiray
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link

Build failed.

@debarshiray
Copy link
Member

recheck

@debarshiray debarshiray merged commit 6c86cab into containers:main Jun 29, 2021
@HarryMichal HarryMichal deleted the cmd/root/wire-toolbox-to-enter branch June 29, 2021 14:41
@HarryMichal
Copy link
Member Author

Thanks @debarshiray for the review and for the update. Appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. CLI Issue is related to the command line interface 3. New Feature New feature 6. Major Change May cause breakage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants