Elm command line and setting up programatically

Previously under Elm 0.18, if I wanted to create an application (not package) that requires installation of some package with a specific major version but latest minor version I could do so programatically by calling

elm-package install --yes foo/bar 3

Under Elm 0.19 this appears no longer to be possible because:

  1. There is no --yes option to the elm command line
  2. Specifying any version number with elm install generates the error elm: TODO show possible arg configurations CallStack (from HasCallStack): error, called at ui/terminal/src/Terminal/Args/Error.hs:281:13 in main:Terminal.Args.Error

So it would appear the only option programatically is to edit the elm.json file and add the package details there.

However, for applications, one needs to specify the full version value down to the patch release number, so minor version ranges appear not to be possible.

My question is, is there a way programmatically of doing what one could once do with elm-package install --yes foo/bar 3, perhaps by interrogating the elm package server to find the latest minor version of a specified major version?

I don’t know about the version number, but for the missing --yes option, does
yes | elm install foo/bar
not work for you?

3 Likes

Thanks for the yes tip (my command line foo is somewhat lacking). Indeed that does work.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.