Skip to content

Commit

Permalink
remove args from "command not found" error
Browse files Browse the repository at this point in the history
  • Loading branch information
hikire committed Oct 8, 2018
1 parent 5aa6f08 commit b77abb3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ const executeCommand = async (...args) => {
const commandProcess = spawn(command, commandArgs, { stdio: "inherit" });
commandProcess.on("error", error => {
if (error.code === "ENOENT") {
process.stderr.write(
`command not found: ${error.path} ${error.spawnargs.join(" ")}` + "\n"
);
process.stderr.write(`command not found: ${error.path}` + "\n");
} else process.stderr.write(error.toString() + "\n");
});
};
Expand Down

0 comments on commit b77abb3

Please sign in to comment.