Installation failure failure - Darwin Mojave 10.14.4
Created by: justanotherdot
Describe the bug Tried running the provided installation script on the README:
$ curl https://raw.githubusercontent.com/haskell/ghcup/master/bootstrap-haskell -sSf | sh
resulting in an installation failure. I tried the recommended ghcup upgrade
to no avail. Rerunning the install command directly with verbose gives us:
$ ~/.ghcup/bin/ghcup --cache --verbose install
mkdir -p /Users/$USER/.ghcup
mkdir -p /Users/$USER/.ghcup/bin
mkdir -p /Users/$USER.ghcup/cache
rm /Users/$USER/.ghcup/cache/.available-versions
rm /Users/$USER/.ghcup/cache/.download-urls
cd /Users/$USER/.ghcup/cache
curl --fail -O https://raw.githubusercontent.com/haskell/ghcup/master//.available-versions
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 686 100 686 0 0 10630 0 --:--:-- --:--:-- --:--:-- 10718
cd /Users/$USER/.ghcup/cache
curl --fail -O https://raw.githubusercontent.com/haskell/ghcup/master//.download-urls
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9237 100 9237 0 0 165k 0 --:--:-- --:--:-- --:--:-- 167k
Installing GHC-8.6.3 for Darwin on architecture x86_64
cd /var/folders/dx/v1bjflqj2q741k8fy6hpwglm0000gn/T/tmp.TWp3Ad3g
xz -cd "/Users/$USER/.ghcup/cache/ghc-8.6.3-x86_64-apple-darwin.tar.xz" | tar -xf -
cd ghc-8.6.3
/Users/$USER/.ghcup/bin/ghcup: line 498: cd: ghc-8.6.3: No such file or directory
Failed to install, consider updating this script via: ghcup upgrade
I think the tarball extraction failed, as there is no directory under temporary directory:
$ ls -a /var/folders/dx/v1bjflqj2q741k8fy6hpwglm0000gn/T/tmp.TWp3Ad3g
./ ../
However, when I run the same command manually, the directory shows up:
$ cd /var/folders/dx/v1bjflqj2q741k8fy6hpwglm0000gn/T/tmp.KnXd9jmC
$ xz -cd ~/.ghcup/cache/ghc-8.6.3-x86_64-apple-darwin.tar.xz | tar -xf -
$ ls
ghc-8.6.3/
so it would appear that the tar extraction isn't necessarily failing to produce a directory unless it's something specific to the script. Any ideas?
To Reproduce Steps to reproduce the behavior:
curl https://raw.githubusercontent.com/haskell/ghcup/master/bootstrap-haskell -sSf | sh
System information
Script version: 0.0.7
Script variables:
GHC install location: /Users/$USER/.ghcup/ghc
Binary install location: /Users/$USER/.ghcup/bin
Tarball cache location: /Users/$USER/.ghcup/cache
Downloader: curl --fail -O <url>
Script update url: https://raw.githubusercontent.com/haskell/ghcup/master//ghcup
GHC download baseurl: https://downloads.haskell.org/~ghc
Meta download url https://raw.githubusercontent.com/haskell/ghcup/master//.download-urls
Meta download format 1
Meta version url https://raw.githubusercontent.com/haskell/ghcup/master//.available-versions
Meta version format 1
Detected system information:
Architecture: x86_64
Distribution: Darwin
Distro alias: darwin
Distro version: 18.5.0