Skip to content

Stack setup fails when stack needs upgrading #300

@odcameron

Description

@odcameron

When first installing Haskell-Vim-Now I encountered the following error:

Setting up GHC if needed...
Stack setup failed with exit code: 1
stderr: RedownloadInvalidResponse Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-19.11.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}

The error was caused by an older version of stack which requested to download from an outdated Github URL ("raw.githubusercontent.com/fpco/lts-haskell/master//lts-19.11.yaml").
Upon executing ..$ sudo stack upgrade then reattempting to install (..$ bash /tmp/haskell-vim-now.sh) the installation proceeded with success.

Recommend adding something like the following lines in the "setup_haskell.hs" file just before msg "Setting up GHC if needed...:

msg "   Upgrading stack if needed"
Turtle.procStrict "stack" ["upgrade"]  $  pure (Turtle.unsafeTextToLine "y") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions