Skip to content

using homebrew inside gitlab CI: Error: Running Homebrew as root is extremely dangerous and no longer supported.

.gitlab-ci.yml:

before_script:
  # from: http://linuxbrew.sh/
  - apt-get update -qq && apt-get install -y -qq build-essential curl git python-setuptools ruby
  - git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
  - PATH="$HOME/.linuxbrew/bin:$PATH"
  - brew install dmd
- dmd

rspec:
  script:
    - env

Error: Running Homebrew as root is extremely dangerous and no longer supported.

Is there a workaround? A better way to do this? (note: i plan on using custom docker images but would like something like this to work) Thanks!