@@ -220,7 +220,8 @@ getConstraints name version =
220220
221221getConstraintsHelp :: Stuff.PackageCache -> Connection -> Pkg.Name -> V.Version -> IO (Either Problem Constraints)
222222getConstraintsHelp cache connection name version =
223− do let path = Stuff.package cache name version </> "elm.json"
223+ do let home = Stuff.package cache name version
224+ let path = home </> "elm.json"
224225 outlineExists <- File.exists path
225226 if outlineExists
226227 then
@@ -246,10 +247,11 @@ getConstraintsHelp cache connection name version =
246247 return (Left (UnavailableOffline name version))
247248
248249 Online manager ->
249− Http.post manager (Website.metadata name version "elm.json") [] BadHttp $ \body ->
250+ Http.get manager (Website.metadata name version "elm.json") [] BadHttp $ \body ->
250251 case D.fromByteString constraintsDecoder body of
251252 Right cs ->
252− do File.writeUtf8 path body
253+ do Dir.createDirectoryIfMissing True home
254+ File.writeUtf8 path body
253255 return $ Right cs
254256
255257 Left _ ->