You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
toolbox create argument 'distro' and 'release' invalid values handling #937
Describe the bug toolbox create command accepts parameters --distro and --release.
It is not clear what values should be added to these,
and passing invalid values behaves strangely:
--distro seems to interpret any invalid value to mean Fedora,
which does not make sense.
If somebody decided to pass that argument,
for sure they were expecting to get what they passed in,
not any fallback because what they wanted is not available
or because they made a typo.
Except if --distro is used, but --release is not,
the resulting error message implies different behavior: release not found for non-default distribution <distro>.
--release seems to use some kind of pattern matching depending on value of distro,
and prints invalid argument for --release if the pattern is not matched,
but does not say what pattern should be matched.
--distro seems to interpret any invalid value to mean Fedora,
which does not make sense.
If somebody decided to pass that argument,
for sure they were expecting to get what they passed in,
not any fallback because what they wanted is not available
or because they made a typo.
Yes, you are right. If an invalid value is explicitly specified through the --distro flag, then we should error out with a suitable message.
--release seems to use some kind of pattern matching depending
on value of distro, and prints invalid argument for --release if the
pattern is not matched, but does not say what pattern should be
matched.
Activity
oturpe commentedon Nov 29, 2021
Related, it would be good if
toolbox create --helpwould listsupported values for
--distroand related patterns for
--release.debarshiray commentedon Nov 29, 2021
Yes, you are right. If an invalid value is explicitly specified through the
--distroflag, then we should error out with a suitable message.Yes, this would be good too. :)
cmd, pkg/utils: Split distro and release parsing and report better er…
cmd, pkg/utils: Split distro and release parsing and report better er…
pkg/utils: Use global default instead of magic value
cmd, pkg/utils: Split distro and release parsing and report better er…
pkg/utils: Use global default instead of magic value
cmd, pkg/utils: Split distro and release parsing and report better er…
pkg/utils: Use global default instead of magic value
cmd, pkg/utils: Split distro and release parsing and report better er…
pkg/utils: Use global default instead of magic value
cmd, pkg/utils: Split distro and release parsing and report better er…
65 remaining items
pkg/utils: Ensure that the distro CLI and config file option is valid
pkg/utils: Clarify the default and fallback values
pkg/utils: Ensure that the distro CLI and config file options are valid
Revert "cmd, pkg/utils: Split distro and release parsing and ..."
pkg/utils: Re-unify container & image name resolution
pkg/utils: Clarify the default and fallback values
pkg/utils: Ensure that the distro CLI and config file options are valid
pkg/utils: Rename a variable
cmd, pkg/utils: Clarify the error message if the release is invalid
pkg/utils: Rename a variable
cmd, pkg/utils: Clarify the error message if the release is invalid
Increase the validation coverage for the container & release options
cmd/utils, pkg/utils: Beautify the error messages for the distro option
cmd/utils, pkg/utils: Improve the error messages for the distro option
cmd/utils, pkg/utils: Improve an error message for the image option