One-line installation fails on macOS Mojave: 'realpath: command not found'
Overview
When attempting the one-line installation on macOS Mojave, it fails with an error about realpath not being found.
Here's the Terminal output:
$ curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2203 0 2203 0 0 9157 0 --:--:-- --:--:-- --:--:-- 9179
INFO: This is the GDK one line installation. For more information, please visit:
INFO: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/index.md#one-line-installation
INFO:
INFO: The source for the installation script can be viewed at:
INFO: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/support/install
Cloning into 'gitlab-development-kit'...
remote: Enumerating objects: 24213, done.
remote: Counting objects: 100% (7611/7611), done.
remote: Compressing objects: 100% (1081/1081), done.
remote: Total 24213 (delta 7409), reused 6554 (delta 6530), pack-reused 16602
Receiving objects: 100% (24213/24213), 21.67 MiB | 10.41 MiB/s, done.
Resolving deltas: 100% (16550/16550), done.
support/bootstrap-common.sh: line 3: realpath: command not found
make: *** [bootstrap] Error 127
If you are a Homebrew user, you can brew install coreutils and this gets you past the error. (Props to https://github.com/whatwg/html-build/issues/90)
Proposal
I can think of at a couple of ways to fix this, not sure which is best:
- Document this in the dependency installation instructions section.
- Alternately, a 'realpath' function could be created "inline" in the bash script instead. See https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-os-x (also mentioned in that issue)
Environment
- Operating system: macOS Mojave, 10.14.6 (18G9216)