Skip to content

Commit

Permalink
fix(pngquant): handle upstream errors
Browse files Browse the repository at this point in the history
err.code has been renamed to err.exitCode in execa

Closes #182
  • Loading branch information
JamieMason committed Nov 4, 2019
1 parent 7413b22 commit 9557b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pngquant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export const pngquant = async (pngFilePaths: string[], options: IOptions): Promi
...pngFilePaths
]);
} catch (err) {
if (err.code !== 99 && err.code !== 98) {
throw new Error(err.message);
if (err.exitCode !== 99 && err.exitCode !== 98) {
throw err;
}
}
};

0 comments on commit 9557b8f

Please sign in to comment.