Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cblp committed Jun 3, 2016
1 parent 57bb4e2 commit 74d7cd9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Behavior changes:

Other enhancements:

* `setup-info` in stack.yaml and in stack-setup.yaml, also `--ghc-bindist` command-line option
now support absolute file path in `url` field.

Bug fixes:

## 1.1.2
Expand Down
2 changes: 2 additions & 0 deletions doc/yaml_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ setup-info:
url: "https://example.com/ghc-7.10.2-i386-unknown-mingw32-foo.tar.xz"
```

`url` may be either URL or (since UNRELEASED) absolute file path.

### pvp-bounds

(Since 0.1.5)
Expand Down
6 changes: 4 additions & 2 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,11 @@ downloadFromInfo programsDir downloadInfo tool = do
let DownloadInfo{downloadInfoContentLength=contentLength, downloadInfoSha1=sha1} =
downloadInfo
when (isJust contentLength) $
$logWarn "`content-length` should not be specified when `url` is a file path"
$logWarn "`content-length` in not checked \n\
\and should not be specified when `url` is a file path"
when (isJust sha1) $
$logWarn "`sha1` should not be specified when `url` is a file path"
$logWarn "`sha1` is not checked and \n\
\should not be specified when `url` is a file path"
return path
_ ->
fail $ "`url` must be either an HTTP URL or absolute file path: " ++ url
Expand Down
1 change: 1 addition & 0 deletions src/Stack/Types/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,7 @@ parseGHCVariant s =
-- | Information for a file to download.
data DownloadInfo = DownloadInfo
{ downloadInfoUrl :: Text
-- ^ URL or absolute file path
, downloadInfoContentLength :: Maybe Int
, downloadInfoSha1 :: Maybe ByteString
} deriving (Show)
Expand Down

0 comments on commit 74d7cd9

Please sign in to comment.