dxw / local-env

Get set up quickly for working with software at dxw
MIT License
3 stars 0 forks source link

./install: $(...) does not contain bash script. #5

Closed dragon-dxw closed 3 years ago

dragon-dxw commented 3 years ago

it looks like "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" is returning the command to bash to the console rather than to bash itself.

But if I copy the line to use wc instead of bash, that fails (with a zero length file after pressing Ctrl-D) and the bash line succeeds.

run wc "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" run arch -arm64e /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

(at least until a similar problem happens later on to install homebrew)

=> Installing Homebrew for Apple silicon software
==> You might be asked for your login password and to confirm
==> Once you've confirmed, this might take a few minutes...
==$ arch -arm64e /bin/bash -c #!/bin/bash
set -u

abort() {
  printf "%s
" "$@"
  exit 1
}
...
  cat <<EOS
    See ${tty_underline}https://docs.brew.sh/linux${tty_reset} for more information
- We recommend that you install GCC:
    brew install gcc

EOS
fi
/bin/bash: -c: option requires an argument
erbridge commented 3 years ago

Interesting. This is pulled verbatim from Homebrew docs:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
erbridge commented 3 years ago

Ran the command locally and it behaves as expected.

erbridge commented 3 years ago

But yes. I can reproduce when running the install script.