Skip to content

Commit a094a85

Browse files
authored
Merge pull request #6601 from commercialhaskell/fix6600
2 parents 035ffea + 66a87a8 commit a094a85

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Bug fixes:
7676
package keys even for very long package names.
7777
* The Error S-6362 message now acknowledges when the wanted compiler has been
7878
specified at the command line.
79+
* Fix a regression, introduced in Stack 2.11.1, that caused the `script` command
80+
to parse an (otherwise ignored) project-level configuration file.
7981

8082
## v2.15.7 - 2024-05-12
8183

src/Stack/Script.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ scriptCmd opts = do
164164
then (NoRun, SECompile)
165165
else (opts.shouldRun, opts.compile)
166166

167-
root <- withConfig NoReexec $ view stackRootL
168167
outputDir <- if opts.useRoot
169168
then do
169+
root <- local (over globalOptsL modifyGO) $
170+
withConfig NoReexec $ view stackRootL
170171
scriptFileAsDir <- maybe
171172
(throwIO $ FailedToParseScriptFileAsDirBug scriptFile)
172173
pure

0 commit comments

Comments
 (0)