# Override the cabal step?

**URL:** <https://travis-ci.community/t/override-the-cabal-step/971>\
**Category:** Haskell\
**Created:** [November 19, 2018, 9:52am UTC](https://travis-ci.community/t/override-the-cabal-step/971 "2018-11-19T09:52:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fommil](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fommil/32/491_2.png) [@fommil](https://travis-ci.community/u/fommil)\
**Post date:** [November 19, 2018, 9:52am UTC](https://travis-ci.community/t/override-the-cabal-step/971/1 "2018-11-19T09:52:21Z")

</div>

Hi all, the haskell image runs a step that I can’t seem to control called “cabal” where it runs “cabal update”

But I am using cabal 2.4 and the correct command is “cabal new-update”. Is there a way to override this?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 19, 2018, 1:02pm UTC](https://travis-ci.community/t/override-the-cabal-step/971/2 "2018-11-19T13:02:07Z")

</div>

Hello, there.

At the moment, `cabal update` is hard-coded in the `setup` phase

> <https://github.com/travis-ci/travis-build/blob/1786a1f85e844ffad7f558ae58a43e6d720ee4da/lib/travis/build/script/haskell.rb#L52>

which takes place before any of your customization takes place.

When you say `cabal new-update` is “correct,” do you mean that `cabal update` is problematic? If so, in what way?

---

<div class="post-metadata">

**Author:** ![fommil](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fommil/32/491_2.png) [@fommil](https://travis-ci.community/u/fommil)\
**Post date:** [November 19, 2018, 4:07pm UTC](https://travis-ci.community/t/override-the-cabal-step/971/3 "2018-11-19T16:07:48Z")

</div>

yes, `cabal update` is problematic… more recent versions of the `cabal` program recommend that to use `new-update` instead. This will swap back to `update` after some grace time, but we are transitioning right now.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 19, 2018, 5:14pm UTC](https://travis-ci.community/t/override-the-cabal-step/971/4 "2018-11-19T17:14:38Z")

</div>

How “problematic”? Does your build fail if `cabal update` is used? Can you, for example, run `cabal new-update` in `before_install` without ill effects?

If possible, I would like to leave this up to the tool to resolve, especially when the stated plan is to go back to `cabal update` at some point in the (hopefully not-so-distant) future.

---

<div class="post-metadata">

**Author:** ![fommil](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fommil/32/491_2.png) [@fommil](https://travis-ci.community/u/fommil)\
**Post date:** [November 19, 2018, 7:31pm UTC](https://travis-ci.community/t/override-the-cabal-step/971/5 "2018-11-19T19:31:15Z")

</div>

the build will fail unless I do an explicit `cabal new-update` as a workaround.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 20, 2018, 1:54am UTC](https://travis-ci.community/t/override-the-cabal-step/971/6 "2018-11-20T01:54:02Z")

</div>

Where can we find the definitive reference to this new subcommand, and the plan to morph it into the standard `update` command?
