Skip to content

Commit

Permalink
Fix #6600 Don't use 'raw' withConfig with stack script
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Jun 5, 2024
1 parent 035ffea commit 66a87a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Bug fixes:
package keys even for very long package names.
* The Error S-6362 message now acknowledges when the wanted compiler has been
specified at the command line.
* Fix a regression, introduced in Stack 2.11.1, that caused the `script` command
to parse an (otherwise ignored) project-level configuration file.

## v2.15.7 - 2024-05-12

Expand Down
3 changes: 2 additions & 1 deletion src/Stack/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ scriptCmd opts = do
then (NoRun, SECompile)
else (opts.shouldRun, opts.compile)

root <- withConfig NoReexec $ view stackRootL
outputDir <- if opts.useRoot
then do
root <- local (over globalOptsL modifyGO) $
withConfig NoReexec $ view stackRootL
scriptFileAsDir <- maybe
(throwIO $ FailedToParseScriptFileAsDirBug scriptFile)
pure
Expand Down

0 comments on commit 66a87a8

Please sign in to comment.