Skip to content

Commit

Permalink
Fix Setup.exe name for --upgrade-cabal on Windows #1002
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Sep 17, 2015
1 parent c5772d0 commit f24a247
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Bug fixes:
* copyFile can't handle directories [#942](https://github.com/commercialhaskell/stack/pull/942)
* Support for spaces in Haddock interface files [fpco/minghc#85](https://github.com/fpco/minghc/issues/85)
* Temporarily building against a "shadowing" local package? [#992](https://github.com/commercialhaskell/stack/issues/992)
* Fix Setup.exe name for --upgrade-cabal on Windows [#1002](https://github.com/commercialhaskell/stack/issues/1002)

## 0.1.4.1

Expand Down
6 changes: 5 additions & 1 deletion src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ upgradeCabal menv wc = do
Just dir -> return dir

runIn dir (compilerExeName wc) menv ["Setup.hs"] Nothing
let setupExe = toFilePath $ dir </> $(mkRelFile "Setup")
platform <- asks getPlatform
let setupExe = toFilePath $ dir </>
(case platform of
Platform _ os | isWindows os -> $(mkRelFile "Setup.exe")
_ -> $(mkRelFile "Setup"))
dirArgument name' = concat
[ "--"
, name'
Expand Down

0 comments on commit f24a247

Please sign in to comment.