Skip to content

Commit 32a67ea

Browse files
committed
Add error handling for failed /proc/stat read in CPU usage script
1 parent 8450ab1 commit 32a67ea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

_posts/2025-05-10-cpu-usage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ script: |
7373
7474
// Check if the command was successful
7575
if (!procStatContent) {
76+
console.error('Failed to read /proc/stat');
77+
// If the command fails, return empty label and default icon
7678
return {
7779
label: '',
7880
icon: 'tachometer'

0 commit comments

Comments
 (0)