Skip to content

Commit

Permalink
Merge pull request #5013 from jneira/warn-path-spc
Browse files Browse the repository at this point in the history
Show warning about `local-programs-path` with spaces on windows when running scripts
  • Loading branch information
mattaudesse authored Aug 30, 2019
2 parents f73113a + 0937c8e commit 218b14e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Behavior changes:

Other enhancements:

* Show warning about `local-programs-path` with spaces on windows
when running scripts. See
[#5013](https://github.com/commercialhaskell/stack/pull/5013)

* Add `ls dependencies json` which will print dependencies as JSON.
`ls dependencies --tree` is now `ls dependencies tree`. See
[#4424](https://github.com/commercialhaskell/stack/pull/4424)
Expand Down
8 changes: 4 additions & 4 deletions src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ configFromConfigMonoid
shortLocalProgramsFilePath <-
liftIO $ getShortPathName localProgramsFilePath
when (' ' `elem` shortLocalProgramsFilePath) $ do
logWarn $ "Stack's 'programs' path contains a space character and " <>
logError $ "Stack's 'programs' path contains a space character and " <>
"has no alternative short ('8 dot 3') name. This will cause " <>
"problems with packages that use the GNU project's 'configure' " <>
"shell script. Use the 'local-programs-path' configuation option " <>
"to specify an alternative path. The current 'shortest' path is: " <>
display (T.pack shortLocalProgramsFilePath)
"shell script. Use the 'local-programs-path' configuration option " <>
"to specify an alternative path. The current path is: " <>
display (T.pack localProgramsFilePath)
platformOnlyDir <- runReaderT platformOnlyRelDir (configPlatform, configPlatformVariant)
let configLocalPrograms = configLocalProgramsBase </> platformOnlyDir

Expand Down

0 comments on commit 218b14e

Please sign in to comment.