Skip to content

Commit e0e904b

Browse files
committed
review: update prints
1 parent 76de59e commit e0e904b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cmd/extensions.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,11 @@ func (e ExtensionsCmd) Upload(ctx context.Context, in ExtensionsUploadInput) err
319319

320320
// Pre-flight size check
321321
if in.Output != "json" {
322-
pterm.Info.Println("Analyzing extension directory...")
322+
pterm.Info.Println("Compressing extension directory...")
323323
}
324324

325325
tmpFile := filepath.Join(os.TempDir(), fmt.Sprintf("kernel_ext_%d.zip", time.Now().UnixNano()))
326326

327-
if in.Output != "json" {
328-
pterm.Info.Println("Zipping extension directory...")
329-
}
330-
331327
if err := util.ZipDirectory(absDir, tmpFile, &defaultExtensionExclusions); err != nil {
332328
pterm.Error.Println("Failed to zip directory")
333329
return err
@@ -344,8 +340,8 @@ func (e ExtensionsCmd) Upload(ctx context.Context, in ExtensionsUploadInput) err
344340
}
345341

346342
if fileInfo.Size() > MaxExtensionSizeBytes {
347-
pterm.Error.Printf("Extension bundle is too large: %s (max: 50MB)\n",
348-
util.FormatBytes(fileInfo.Size()))
343+
pterm.Error.Printf("Extension bundle is too large: %s (max: %s)\n",
344+
util.FormatBytes(fileInfo.Size()), util.FormatBytes(MaxExtensionSizeBytes))
349345
pterm.Info.Println("\nSuggestions to reduce size:")
350346
pterm.Info.Println(" 1. Ensure you're building the extension for production")
351347
pterm.Info.Println(" 2. Remove unnecessary assets (large images, videos)")

0 commit comments

Comments
 (0)