Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spago run -- needs to pass through args to node, or have some mechanism to do so #267

justinwoo opened this issue Jun 15, 2019 · 2 comments


None yet
3 participants
Copy link

commented Jun 15, 2019


exports.argv = process.argv;


module Main where

import Prelude

import Effect (Effect)
import Effect.Aff as Aff
import Effect.Class.Console (logShow)

foreign import argv :: Array String

main :: Effect Unit
main = Aff.launchAff_ do
  logShow argv


$ spago run -- afwaefwaefo
Installation complete.
purs compile: No files found using pattern: afwaefwaefo
Build succeeded.


$ node -e "require('./output/Main').main()" 12313 owijewejf

This comment has been minimized.

Copy link

commented Jun 16, 2019

There is a small issue here, and it's that everything that goes after -- gets passed to purs in all commands that might build (build, bundle-*, run, etc), so I think we should keep it like that everywhere for consistency.

So how about adding a --node-args flag to the test and run commands?


This comment has been minimized.

Copy link

commented Jun 16, 2019

Got some open hacking time and just finished adding other new arg. I can try a first pass at this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.