From 92b049b84a0fba77e49b4fc82d480a8ad8f63727 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Wed, 9 Feb 2022 07:18:29 -0600 Subject: [PATCH 1/4] Add '--' after node eval and before node args --- src/Spago/Build.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From a0cc242ee68858c04d78b7b5169cf9310862480f Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Wed, 9 Feb 2022 07:21:14 -0600 Subject: [PATCH 2/4] Verify that spago run with flag like node arg works --- test/SpagoSpec.hs | 1 + 1 file changed, 1 insertion(+) 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 From d2ecb3d8e3fc0b474907b8005fd3378d93ab028f Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Wed, 9 Feb 2022 07:22:47 -0600 Subject: [PATCH 3/4] Add changleog entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9803e384b..76fb5b8b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +Bugfixes +- Make `spago run` work when `node-args` includes flag-like value (#856) + ## [0.20.6] - 2022-02-09 Bugfixes: From a3a239a719b9e8031efd8d4fbc4623d913707cab Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 12 Feb 2022 09:22:41 -0600 Subject: [PATCH 4/4] Bump release and version --- CHANGELOG.md | 2 ++ spago.cabal | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76fb5b8b7..ad4be7c1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ 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) 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