Skip to content

Commit

Permalink
Add '--' after node eval and before node args (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez authored Feb 12, 2022
1 parent d79eeab commit 41d9c96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion spago.cabal
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/purescript/spago#readme>
homepage: https://github.com/purescript/spago#readme
bug-reports: https://github.com/purescript/spago/issues
Expand Down
2 changes: 1 addition & 1 deletion src/Spago/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/SpagoSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 41d9c96

Please sign in to comment.