We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28cd788 commit 01b23ebCopy full SHA for 01b23eb
cmd/lens/util.go
@@ -63,10 +63,13 @@ func checkZstd() error {
63
}
64
65
cmd := exec.Command("tar", "--zstd")
66
- output, err := cmd.CombinedOutput()
67
- if err != nil {
68
- log.Println("Error checking zstd: ", err)
69
- }
+ output, _ := cmd.CombinedOutput()
+ // Normally, when zstd is installed,
+ // tar --zstd
+ // tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
70
+ // Try 'tar --help' or 'tar --usage' for more information.
71
+ // return code is $? = 2
72
+ // no need to check err, but to check output whether zstd is supported by this version of tar
73
if strings.Contains(string(output), "unrecognized option") {
74
return fmt.Errorf("zstd is not supported")
75
0 commit comments