rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
270 stars 136 forks source link

Curl dependency error swallowed #198

Closed Draiken closed 1 year ago

Draiken commented 5 years ago

After wasting quite a bit of time trying to decipher this error from Ansible, I found out that curl was not installed.

FAILED! => {"changed": true, "cmd": "/tmp/rvm-installer.sh latest --path ~/.rvm --auto-dotfiles --user-install", "delta": "0:00:00.038466", "end": "2019-02-13 19:18:01.098527", "msg": "non-zero return code", "rc": 200, "start": "2019-02-13 19:18:01.060061", "stderr": "", "stderr_lines": [], "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.\nDownloading https://github.com/rvm/rvm/archive/.tar.gz\n\nCould not download 'https://github.com/rvm/rvm/archive/.tar.gz'.\n  curl returned status '200'.\n\nDownloading https://bitbucket.org/mpapis/rvm/get/.tar.gz\n\nCould not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.\n  curl returned status '200'.", "stdout_lines": ["Turning on auto dotfiles mode.", "Turning on user install mode.", "Downloading https://github.com/rvm/rvm/archive/.tar.gz", "", "Could not download 'https://github.com/rvm/rvm/archive/.tar.gz'.", "  curl returned status '200'.", "", "Downloading https://bitbucket.org/mpapis/rvm/get/.tar.gz", "", "Could not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.", "  curl returned status '200'."]}

There's nothing here that says that curl isn't installed and the stdout is misleading with the missing file name on the URL moving people further from the solution.

I discovered curl was missing after manually running the installer with set -x and seeing this line:

printf 'ERROR: %b\n' 'RVM requires '\''curl'\''. Install '\''curl'\'' first and try again.'

Not sure why this error is swallowed, but we should see a better error, since this role doesn't want to install the dependency automatically.

Draiken commented 1 year ago

Just giving up