I am running a Python script during the
before_deploy stage to determine the presence of a file. If that file is not found, I am trying to use the poorly-documented
travis_terminate command to halt the process:
This seems to be a common approach, as mentioned in #1574 and other issues. However, this invocation results in a
FileNotFoundError: [Errno 2] No such file or directory: 'travis_terminate': 'travis_terminate'
At first, I thought the cause was that I had not opted-into the (deprecated) v0 conditions, but even after adding
conditions: v0 to the top of
.travis.yml, the result is the same error.
The equivalent command for CircleCI, by the way, functions flawlessly:
run_process(["circleci", "step", "halt"])
Why does calling
travis_terminate result in a “file not found” error? Is it not available during the
before_deploy stage? Or has the
travis_terminate command been removed without warning? If so, what invocation can instead be used to immediately halt the process, with the ability to specify 0 or 1 exit codes?