typescript-action/__tests__
Hung-I Wang 2525b376e4
Avoid spawning a shell when running node in test (#155)
`execSync` by default spawns a shell to exec the specified command. And,
without specifying an absolute path to the node binary, it will be
searched in `PATH` where yarn prepends a temporary directory containing
a shell script called **node** that wraps the original node binary with
exec, resulting in implicitly chaining a shell again.
On some Linux distros, the default non-interactive shell, such as the
Dash shell of Debian, silently discards dashes (`-`) in names of
environment variables. But GitHub Actions allows dashes in names of
input variables which are then converted to environment variables in the
form of `INPUT_<VARIABLE_NAME>`.
So the commit fix the error-prone test code by using execFileSync, which
by default exec directly without spawning a shell, to run node with its
absolute path.
2020-11-20 06:28:46 -05:00
..
main.test.ts Avoid spawning a shell when running node in test (#155) 2020-11-20 06:28:46 -05:00