Skip to content

Commit

Permalink
Allow non-zero exit codes in nvm setup
Browse files Browse the repository at this point in the history
See nvm-sh/nvm#721. NVM expects us to not
terminate even if it produces non-zero exit codes.
  • Loading branch information
Åsmund Grammeltvedt committed Apr 8, 2015
1 parent 49fe6d8 commit 91cf502
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages

setup(name='travis-runner',
version='0.3.0',
version='0.3.1',
description='Local job runner for travis using docker',
url='https://github.com/asmundg/travis-runner',
author='Åsmund Grammeltvedt',
Expand Down
5 changes: 5 additions & 0 deletions travis_runner/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def setup_system_env(env):
0, 'echo "Acquire::http::Proxy \\"{}\\";" > /etc/apt/apt.conf'
.format(proxy))
env.insert(0, 'export http_proxy={}'.format(proxy))
env.insert(0, 'set -o errexit')
env.insert(0, 'set -o pipefail')


Expand Down Expand Up @@ -132,7 +133,11 @@ def setup_node(config, envs):
'curl --location'
' https://raw.github.com/creationix/nvm/master/nvm.sh'
' -o /tmp/nvm.sh')
# Disable error checking in NVM
# (https://github.com/creationix/nvm/issues/721)
setup.append('set +o errexit')
setup.append('. /tmp/nvm.sh')
setup.append('set -o errexit')
setup.append('nvm install {}'.format(version))


Expand Down
2 changes: 1 addition & 1 deletion travis_runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
try:
subprocess.check_call(
'docker run {} --rm -e http_proxy=$http_proxy -v $(pwd):/src'
' ubuntu:precise bash -ex /src/{}'.format(
' ubuntu:precise bash -x /src/{}'.format(
link_arg, env), shell=True)
except subprocess.CalledProcessError:
if links:
Expand Down

0 comments on commit 91cf502

Please sign in to comment.