-
Notifications
You must be signed in to change notification settings - Fork 208
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
Fix no export subcmd panic on mac #1429
Conversation
Signed-off-by: Junduo Dong <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1429 +/- ##
==========================================
- Coverage 46.46% 46.44% -0.02%
==========================================
Files 123 123
Lines 38643 38643
Branches 38643 38643
==========================================
- Hits 17954 17948 -6
- Misses 19716 19722 +6
Partials 973 973
|
Signed-off-by: Junduo Dong <[email protected]>
} | ||
#[cfg(not(target_os = "linux"))] | ||
{ | ||
println!("{}", usage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixup! Maybe give the warning to tell users we can't support export
subcommand for macos here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually if the user runs export
on macos, it cannot be recognized.
% ./target/debug/nydus-image export
error: The subcommand 'export' wasn't recognized
Usage: nydus-image [OPTIONS] [COMMAND]
For more information try '--help'
IMHO this error msg is enough, isn't it ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also export
has been removed from the available subcmd on macos:
% ./target/debug/nydus-image -h
Build, analyze, inspect or validate RAFS filesystems/Nydus accelerated container images
Usage: nydus-image [OPTIONS] [COMMAND]
Commands:
create Create RAFS filesystems from directories, tar files or OCI images
chunkdict deduplicate RAFS filesystem metadata
merge Merge multiple bootstraps into a overlaid bootstrap
check Validate RAFS filesystem metadata
inspect Inspect RAFS filesystem metadata in interactive or request mode
stat Generate statistics information for RAFS filesystems
compact (experimental)Compact specific nydus image, remove unused chunks in blobs, merge small blobs
unpack Unpack a RAFS filesystem to a tar file
help Print this message or the help of the given subcommand(s)
Options:
-L, --log-file <log-file> Log file path
-l, --log-level <log-level> Log level: [default: info] [possible values: trace, debug, info, warn, error]
-h, --help Print help information
-V, --version Print version information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe some macos users ask why not have export
subcommand on his mac, but I think it's also okay for me.
Relevant Issue (if applicable)
If there are Issues related to this PullRequest, please list it.
Fix panic caused by no
export
subcmd on mac in issue #1340Details
Please describe the details of PullRequest.
Types of changes
What types of changes does your PullRequest introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply.