Skip to content

Commit

Permalink
fix: use execa exitCode not code
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jun 26, 2019
1 parent a3b6551 commit e773536
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"commander": "^2.20.0",
"execa": "^2.0.0",
"execa": "^2.0.1",
"expression-expander": "^7.0.2",
"globby": "^9.2.0",
"iterable-string-interceptor": "^1.0.1"
Expand Down
4 changes: 2 additions & 2 deletions src/pacman.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export async function makepkg(context, stagingDir) {
const p = await proc;
console.log(p);

if (p.code !== 0) {
throw new Error(`unexpected exit ${p.code} from makepkg`);
if (p.exitCode !== 0) {
throw new Error(`unexpected exit ${p.exitCode} from makepkg`);
}

let arch = "any";
Expand Down
2 changes: 1 addition & 1 deletion tests/pacman-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ test("makepkg simple", async t => {

//console.log(error);

t.regex(error.message, /Command failed|ENOENT/);
t.regex(error.message, /Command failed|ENOENT|SIGUSR1/);
});

0 comments on commit e773536

Please sign in to comment.