volta
volta copied to clipboard
Correctly handle flags with values when parsing global installs
As noted in #835, there is a gap in our parsing of npm and yarn commands for global installs: All flags must be specified using the = notation—--prefix=/usr/local/bin—and not the separate-argument notation—--prefix /usr/local/bin. This is because we don't have a list of which flags require values and which are booleans for npm and yarn.
We should investigate creating a list of flags that use values to use while parsing, so that we can correctly handle that case as well. While iterating through the arguments, we could then detect those flags specified without the = and consume the following argument as the value.