You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@actions/exec doesn't support multiple commands #461
awaitexec.exec('npm ci && npm run build --if-present')
It was expanded and run:
So it looks like the first npm command was prefixed with /usr/local/bin, but the second wasn't. It also didn't throw an error, which made this difficult to debug. What's the right way to
imo such design create big overhead when run multiple commands
on every command exec.execchild_process spawns
its will be awesome if multiple commands execution will be added
imo such design create big overhead when run multiple commands
on every command exec.execchild_process spawns
its will be awesome if multiple commands execution will be added
Is it big overhead though? I can't imagine any modern container/system would have a problem with this... :)
Activity
eine commentedon May 22, 2020
You can use which to get the full path to npm.
JasonEtco commentedon May 24, 2020
I would expect
@actions/execto do that under the hood, not just for the first command but for all commands chained with&&s.eine commentedon May 24, 2020
@JasonEtco, AFAIK
execis not a bash interpreter.NorseGaud commentedon May 31, 2020
Sure enough, this works great
Ciberusps commentedon Jun 12, 2020
imo such design create big overhead when run multiple commands
on every command
exec.execchild_processspawnsits will be awesome if multiple commands execution will be added
NorseGaud commentedon Jun 14, 2020
Is it big overhead though? I can't imagine any modern container/system would have a problem with this... :)
rickstaa commentedon Dec 12, 2020
Related to #346, #359.This would be a very nice feature to have! 🚀 I currently use the following workaround that was given in #359 by @hrueger.
LINUX/MAC:
WINDOWS:
thboop commentedon Apr 29, 2021
execisn't intended to be a bash interpreter. We don't support shell functions currently. I'm going to retag this as an enhancement.You can use the above workaround to invoke a shell with your command and run it that way, if you need access to that.