Skip to content

Commit

Permalink
chore: exit process on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaroz committed Dec 18, 2024
1 parent 7a7f5e5 commit e2a1343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/optimize-svg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
combine:
optimize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions scripts/optimize-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function isValidSvg(filePath) {

if (!fileName.endsWith('logo.svg')) {
console.error(`Error: File does not end with 'logo.svg' -> ${filePath}`);
// process.exit(1); // Exit immediately if criteria is not met
process.exit(1); // Exit immediately if criteria is not met
}

if (stats.size > MAX_FILE_SIZE) {
console.error(`Error: File size exceeds 20KBs -> ${filePath}`);
// process.exit(1); // Exit immediately if criteria is not met
process.exit(1); // Exit immediately if criteria is not met
}
}

Expand Down

0 comments on commit e2a1343

Please sign in to comment.