mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-21 08:40:49 +00:00
Handle ENOENT exceptions with a graceful message
This commit is contained in:
parent
65d1ea3d90
commit
598c7ea894
2 changed files with 12 additions and 0 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -204,6 +204,12 @@ try {
|
|||
});
|
||||
|
||||
} catch (error) {
|
||||
|
||||
if (error.code == 'ENOENT') {
|
||||
console.log(`The '${error.path}' executable could not be found. Please make sure it is on your PATH and/or the necessary packages are installed.`);
|
||||
console.log(`PATH is set to: ${process.env.PATH}`);
|
||||
}
|
||||
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
||||
|
|
6
index.js
6
index.js
|
@ -87,5 +87,11 @@ try {
|
|||
});
|
||||
|
||||
} catch (error) {
|
||||
|
||||
if (error.code == 'ENOENT') {
|
||||
console.log(`The '${error.path}' executable could not be found. Please make sure it is on your PATH and/or the necessary packages are installed.`);
|
||||
console.log(`PATH is set to: ${process.env.PATH}`);
|
||||
}
|
||||
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue