mirror of
https://github.com/webfactory/ssh-agent.git
synced 2026-03-13 14:59:07 +08:00
Handle ENOENT exceptions with a graceful message
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user