diff --git a/cmd/commandline/bundle/package.go b/cmd/commandline/bundle/package.go index f866932..e84a5b6 100644 --- a/cmd/commandline/bundle/package.go +++ b/cmd/commandline/bundle/package.go @@ -10,17 +10,20 @@ func PackageBundle(bundlePath string, outputPath string) { packager, err := loadBundlePackager(bundlePath) if err != nil { log.Error("Failed to load bundle packager: %v", err) + os.Exit(1) return } zipFile, err := packager.Export() if err != nil { log.Error("Failed to export bundle: %v", err) + os.Exit(1) return } if err := os.WriteFile(outputPath, zipFile, 0644); err != nil { log.Error("Failed to write zip file: %v", err) + os.Exit(1) return } diff --git a/cmd/commandline/plugin/package.go b/cmd/commandline/plugin/package.go index 9996f52..04f7d02 100644 --- a/cmd/commandline/plugin/package.go +++ b/cmd/commandline/plugin/package.go @@ -12,6 +12,7 @@ func PackagePlugin(inputPath string, outputPath string) { decoder, err := decoder.NewFSPluginDecoder(inputPath) if err != nil { log.Error("failed to create plugin decoder , plugin path: %s, error: %v", inputPath, err) + os.Exit(1) return } @@ -20,12 +21,14 @@ func PackagePlugin(inputPath string, outputPath string) { if err != nil { log.Error("failed to package plugin %v", err) + os.Exit(1) return } err = os.WriteFile(outputPath, zipFile, 0644) if err != nil { log.Error("failed to write package file %v", err) + os.Exit(1) return }