Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v6
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ function validateImagePath(imagefile) {
return resolvedPath;
} catch (err) {
if (err.code === 'ENOENT') {
throw new Error(`Image file not found: ${path.basename(imagefile)}`);
throw new Error(`Image file not found: ${path.basename(imagefile)}`, { cause: err });
} else if (err.code === 'EACCES') {
throw new Error(`Image file not readable: ${path.basename(imagefile)}`);
throw new Error(`Image file not readable: ${path.basename(imagefile)}`, { cause: err });
}
throw err;
}
Expand Down
Loading