diff --git a/CHANGELOG.md b/CHANGELOG.md index 9803e384b..ad4be7c1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.20.7] - 2022-02-12 + +Bugfixes +- Make `spago run` work when `node-args` includes flag-like value (#856) + ## [0.20.6] - 2022-02-09 Bugfixes: diff --git a/spago.cabal b/spago.cabal index 1505fae26..9e73e3de6 100644 --- a/spago.cabal +++ b/spago.cabal @@ -1,7 +1,7 @@ cabal-version: 2.4 name: spago -version: 0.20.6 +version: 0.20.7 description: Please see the README on GitHub at homepage: https://github.com/purescript/spago#readme bug-reports: https://github.com/purescript/spago/issues diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index a3076ba2d..d751eb65f 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -337,7 +337,7 @@ runBackend maybeBackend RunDirectories{ sourceDir, executeDir } moduleName maybe , unModuleName moduleName , "').main()" ] - nodeCmd outputPath'= "node -e \"" <> nodeContents outputPath' <> "\" " <> nodeArgs + nodeCmd outputPath'= "node -e \"" <> nodeContents outputPath' <> "\" -- " <> nodeArgs nodeAction outputPath' = do -- cd to executeDir in case it isn't the same as sourceDir logDebug $ "Executing from: " <> displayShow @FilePath executeDir diff --git a/test/SpagoSpec.hs b/test/SpagoSpec.hs index a4fb260b7..43fe17418 100644 --- a/test/SpagoSpec.hs +++ b/test/SpagoSpec.hs @@ -715,6 +715,7 @@ spec = around_ setup $ do spago ["install", "node-process", "arrays"] >>= shouldBeSuccess spago ["build"] >>= shouldBeSuccess spago ["run", "--node-args", "hello world"] >>= shouldBeSuccessOutput "run-args-output.txt" + spago ["run", "--node-args", "--flagName"] >>= shouldBeSuccess it "Spago should prefer exec-args" $ do