I created a custom JavaScript GitHub action that needs to run simple git
and node
commands. I used the exec npm module provided by GitHub.
Every time I try to run a command it fails. For example:
exec.exec('git config user.name "Package Updater"')
fails with
##[error]There was an error when attempting to execute the process '/usr/bin/git'. This may indicate the process failed to start. Error: spawn /usr/bin/git ENOENT
The same thing happens with node
or npm
commands.
The command above works fine locally if I execute the action's js file with node.