Skip to content

Commit

Permalink
fix: npm init @eslint/config output
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Dec 3, 2021
1 parent 7808d19 commit 5bd24bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/eslint.js
Expand Up @@ -130,10 +130,11 @@ ${message}`);

const spawn = require("cross-spawn");
const npmProcess = spawn.sync("npm", ["init", "@esllint/config"], { encoding: "utf8" });
const error = npmProcess.error;

if (error) {
console.error(error.message);
if (npmProcess.status === 0) {
console.log(npmProcess.stdout);
} else {
console.error(npmProcess.stderr);
}
return;
}
Expand Down

0 comments on commit 5bd24bc

Please sign in to comment.