Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing an invalid path into @actions.exec.exec options argument throws confusing errror #573

Closed
cdb opened this issue Sep 11, 2020 · 0 comments · Fixed by #793
Closed
Labels
bug Something isn't working exec

Comments

@cdb
Copy link

cdb commented Sep 11, 2020

Describe the bug

Calling exec.exec(some_command, some_args, {cwd: <bad-path>} ends up throwing an error that says #[error]There was an error when attempting to execute the process '/bin/<some_command>'. This may indicate the process failed to start. Error: spawn /bin/<some-command> ENOENT. I assume the ENOENT is because of the missing directory, but it seems like it's the binary command that's actually missing.

To Reproduce
Steps to reproduce the behavior:

  1. Add await exec.exec("ls", "-Fla", { cwd: "/bad/path" }); to an action that's using @actions/exec
  2. Run the action, and see ::error::There was an error when attempting to execute the process '/bin/ls'. This may indicate the process failed to start. Error: spawn /bin/ls ENOENT in the log output

Expected behavior

An error message along the lines of Setting working directory to "/bad/path" which does not exist would be more user friendly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants