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
# Node 14 in current project
volta run --node 16 node -v && node -v
v16.20.2
v14.21.3
This may be implicit from the documentation of volta run (only a single <command> is mentioned in the usage), but I think it would be worth mentioning it explicitly in the docs?
The text was updated successfully, but these errors were encountered:
bobo96run
changed the title
volta run affects only 1st command in case of chained commands (e.g. when using && operator)volta run affects only 1st command in case of chained commands (e.g. when using && operator)
Feb 5, 2024
I think that's due to the shell handling the &&. volta run can't handle that, because it never sees the other command.
However, if you explicitly invoke the command chain with a shell like so: volta run --node 16 bash -c "node -v && node -v", then the shell you are running the command from won't parse the &&, but the shell you are invoking with Volta will, resulting in the same node version for all commands:
This could probably be an additional recipe on the documentation. 🤔
Hi and thank you first for this awesome tool!
When using the
volta run
command (https://docs.volta.sh/reference/run) with chained commands (using command chaining operators, like;
,&&
and the like, see e.g. https://www.geeksforgeeks.org/chaining-commands-in-linux/), only the first one is affected by thevolta run
options:This may be implicit from the documentation of
volta run
(only a single<command>
is mentioned in the usage), but I think it would be worth mentioning it explicitly in the docs?The text was updated successfully, but these errors were encountered: