Skip to content

Commit

Permalink
fix: handle empty store on blobs:list (#6420)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Mar 8, 2024
1 parent ead8cf1 commit 726745a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/blobs/blobs-list.ts
Expand Up @@ -27,9 +27,11 @@ export const blobsList = async (storeName: string, options: Options, command: Ba
})

if (options.json) {
logJson({ blobs, directories })
return logJson({ blobs, directories })
}

return
if (blobs.length === 0 && directories.length === 0) {
return log(`Netlify Blobs store ${chalk.yellow(storeName)} is empty`)
}

const table = new AsciiTable(`Netlify Blobs (${storeName})`)
Expand Down

2 comments on commit 726745a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,328
  • Package size: 305 MB
  • Number of ts-expect-error directives: 1,179

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,328
  • Package size: 305 MB
  • Number of ts-expect-error directives: 1,179

Please sign in to comment.