# \_travis\_terminate\_MacOSX: command not found

**URL:** <https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846>\
**Category:** Deployment\
**Created:** [September 7, 2020, 6:08pm UTC](https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846 "2020-09-07T18:08:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marimeireles](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/marimeireles/32/5153_2.png) [@marimeireles](https://travis-ci.community/u/marimeireles)\
**Post date:** [September 7, 2020, 6:08pm UTC](https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846/1 "2020-09-07T18:08:40Z")

</div>

In this build: [https://travis-ci.com/github/mamba-org/minirhumba/jobs/382012943](https://travis-ci.com/github/mamba-org/minirhumba/jobs/382012943)

I get

```auto
Done. Your build exited with 0.

/Users/travis/.travis/functions: line 521: _travis_terminate_MacOSX: command not found

```

When only:

```auto
Done. Your build exited with 0.

```

Was expected.

Not really sure what the problem might be since a [really similar repository](https://travis-ci.com/github/conda-forge/miniforge/jobs/381622311) with very similar `travis` and `sh` files seems to run fine.

Any idea of what this error might be or even where I myself can look at the code and try to debug it? It’d be of great help since I didn’t find anything around the web.

Thanks.

\*Not sure if it’s the right tag, sorry for that, couldn’t really find something that’d fit my problem better

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [September 8, 2020, 4:00am UTC](https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846/2 "2020-09-08T04:00:10Z")

</div>

Hey @marimeireles,

Couple examples how `travis_terminate` can be used, for example in a `.travis.yml` file I was making the other day it looked liked this:

```bash
travis_assert() {
  local result=${1:-$?}
  if [$result -ne 0]; then
    echo -e "\n${ANSI_RED}The command \"$TRAVIS_CMD\" failed and exited with $result during $TRAVIS_STAGE.${ANSI_RESET}\n\nYour build has been stopped."
    travis_terminate 2
  fi
}

```

Another example would be:

```bash
travis_terminate() {
  set +e

```

Both of these resulted in non-issue. From briefly looking at your `.travis.yml` I don’t see anything wrong with it. I suggest you take a look at the following:

> <https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_terminate.bash>

This will give you a better idea of the function of `travis_terminate`, and also I would suggest checking out this response by **native-api,** - and see with this information we can’t curb this issue!

> [@Travis\_terminate command not found](https://travis-ci.community/t/travis-terminate-command-not-found/4383):
>
> 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](https://github.com/travis-ci/docs-travis-ci-com/issues/1899) travis\_terminate command to halt the process: run\_process(["travis\_terminate", "0"]) This seems to be a common approach, as mentioned in [#1574](https://github.com/travis-ci/travis-ci/issues/1574) and other issues. However, this invocation results in a FileNotFoundError: FileNotFoundError: [Errno 2] No such file or directory: 'travis\_terminate': 'travis\_terminate' At first, I though…

I hope this helps, if none of this helps please post back and I’ll investigate further.

-Montana  
(Travis CI Staff)

---

<div class="post-metadata">

**Author:** ![marimeireles](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/marimeireles/32/5153_2.png) [@marimeireles](https://travis-ci.community/u/marimeireles)\
**Post date:** [September 8, 2020, 12:06pm UTC](https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846/3 "2020-09-08T12:06:19Z")

</div>

Yeah, I found the issue I was overwriting the variable $TRAVIS\_OS.  
But thanks to your links it was super easy to debug, thanks a lot @Montana!  
Closing this.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [September 8, 2020, 12:38pm UTC](https://travis-ci.community/t/travis-terminate-macosx-command-not-found/9846/4 "2020-09-08T12:38:00Z")

</div>

Great to hear! If you need anymore help on anything please post back and I’ll be glad to help you.

-Montana
