local-program-path of %STACK_ROOT%\config.yamllocal-programs-path: D:\bin\s t a c k
example.hs: #!/usr/bin/env stack
{- stack
runghc
--resolver=lts-14.1
-}
main = putStrLn "Hello"
stack example.hs.Show the same warning as you run stack <command>:
PS D:\dev\ws\haskell\stack-test> stack build
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: D:\bin\s t a c k\
It shows nothing about the possible issues caused by that configuration.
The original issue was in haskell-ide-engine: a user with spaces in %USER_PROFILE% (very common in windows versions below 10 or win 10 migrated from older one) and the default local-programs-path got an error running the script to install hie executable:
install.hs: C:\Users\Arthur: createProcess: does not exist (No such file or directory)
Setting local-programs-path without spaces fixed the error.
(As a side note i found the warning message a little bit weird: '8 dot 3'? The current 'shortest' path is: D:\bin\s t a c k\? and has a typo: configuation)
$ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
Thanks @jneira! Any interest in submitting a PR?
I can to try it out, although i never had to modify stack code.
As a side note i found the warning message a little bit weird: '8 dot 3'?
The current 'shortest' path is: D:\bin\s t a c k\? and has a typo: configuation
@mattaudesse hi! i think the pr could be merged (if @dbaynard thinks last changes are good)
Thanks @jneira - I think you covered everything @dbaynard asked for but I'll give him a chance to respond before merging.
Thanks, @mattaudesse, and thanks @jneira! Haven't been able to get to this.