Skip to content

Commit

Permalink
fix: Don't pass errored subprocess build
Browse files Browse the repository at this point in the history
An error like
```subprocess.CalledProcessError: Command '['git', 'diff', '--name-only', '95e5cd97d24d9ce809b8287443e9be230a230179...16f5e48']' returned non-zero exit status 128.``` exits with code 1 and exits the build and sets the build as successful
  • Loading branch information
gavindsouza authored Jun 18, 2020
1 parent e5a87aa commit 50c6541
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .travis/roulette.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ def is_docs(file):
commit_range = os.environ.get("TRAVIS_COMMIT_RANGE")
print("Build Type: {}".format(build_type))
print("Commit Range: {}".format(commit_range))

files_changed = get_output("git diff --name-only {}".format(commit_range), shell=False)

try:
files_changed = get_output("git diff --name-only {}".format(commit_range), shell=False)
except Exception:
sys.exit(2)

if "fatal" not in files_changed:
files_list = files_changed.split()
Expand Down

0 comments on commit 50c6541

Please sign in to comment.