diff --git a/lib/dpl/provider/atlas.rb b/lib/dpl/provider/atlas.rb index c51d6d707..198649f09 100644 --- a/lib/dpl/provider/atlas.rb +++ b/lib/dpl/provider/atlas.rb @@ -16,7 +16,7 @@ class Atlas < Provider chmod +x $HOME/bin/gimme fi - if [ -z $GOPATH ]; then + if [ -z "$GOPATH" ]; then export GOPATH="$HOME/gopath" else export GOPATH="$HOME/gopath:$GOPATH" diff --git a/lib/dpl/provider/pypi.rb b/lib/dpl/provider/pypi.rb index 0e72c5f2e..6b73e8056 100644 --- a/lib/dpl/provider/pypi.rb +++ b/lib/dpl/provider/pypi.rb @@ -68,7 +68,7 @@ def pypi_wheel_arg def install_deploy_dependencies # --user likely fails inside virtualenvs but is needed outside to avoid needing sudo. # `--upgrade-strategy eager` prevents the old resolver from keeping an outdated dependency if it's preinstalled - unless context.shell "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && " \ + unless context.shell "if [ -z \"${VIRTUAL_ENV}\" ]; then export PIP_USER=yes; fi && " \ "wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \ "pip install --upgrade --upgrade-strategy eager #{pypi_setuptools_arg} #{pypi_twine_arg} #{pypi_wheel_arg}" error "Couldn't install pip, setuptools, twine or wheel." diff --git a/spec/provider/pypi_spec.rb b/spec/provider/pypi_spec.rb index a9588522d..5e93ae0f8 100644 --- a/spec/provider/pypi_spec.rb +++ b/spec/provider/pypi_spec.rb @@ -9,7 +9,7 @@ describe "#install_deploy_dependencies" do example do expect(provider.context).to receive(:shell).with( - "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade --upgrade-strategy eager setuptools twine wheel" + "if [ -z \"${VIRTUAL_ENV}\" ]; then export PIP_USER=yes; fi && wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade --upgrade-strategy eager setuptools twine wheel" ).and_return(true) provider.install_deploy_dependencies end @@ -21,7 +21,7 @@ provider.options.update(:twine_version => '1.1.0') provider.options.update(:wheel_version => '0.1.0') expect(provider.context).to receive(:shell).with( - "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade --upgrade-strategy eager setuptools==1.0.1 twine==1.1.0 wheel==0.1.0" + "if [ -z \"${VIRTUAL_ENV}\" ]; then export PIP_USER=yes; fi && wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade --upgrade-strategy eager setuptools==1.0.1 twine==1.1.0 wheel==0.1.0" ).and_return(true) provider.install_deploy_dependencies end