Skip to content
Myr

[Fix] `exec`: `--` should stop argument parsing

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Vesa Vilhonen · committed by Jordan Harband · parent 4fdef42 · Browse files · 2 files+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Vesa Vilhonen <vesa@vilhonen.com>
  • Co-authored-by: Sladyn Nunes <sladynnunes98@gmail.com>

Diff stats

2 files+10 added−0 removed

  • tests:+9 added−0 removed
  • other:+1 added−0 removed

2 files+10 added−0 removed

added:test/slow/nvm exec/Running 'nvm exec' with help should not parse+9 added
1#!/bin/sh23die () { echo "$@" ; exit 1; }45\. ../../../nvm.sh67nvm use 0.1089nvm exec stable -- node --help | grep 'Usage: node [options]' || die "Help menu should have been displayed for node and not nvm"
modified:nvm.sh+1 added
2610 unmodified lines
2611 local i2612 for i in "$@"2613 do2614 case $i in2615 --) break ;;2616 '-h'|'help'|'--help')2617 NVM_NO_COLORS=""2618 for j in "$@"; do2619 if [ "${j}" = '--no-colors' ]; then
1566 unmodified lines