purescript-native icon indicating copy to clipboard operation
purescript-native copied to clipboard

pass arguments to run

Open joprice opened this issue 4 years ago • 2 comments

This may be a spago limitation, but I expected to be able to pass flags to spago run that would get forwarded to the binary. Instead, I have to run spago build and then run the binary directly with the args.

While trying this, I also discovered spago's --node-args, which maybe should be renamed --backend-args, since it works to send arguments to the psgo process as well: spago run --node-args "--version"

joprice avatar Oct 09 '20 22:10 joprice

Seems like a good suggestion (renaming it), but it would of course be something to request from the spago folks directly.

andyarvanitis avatar Oct 10 '20 00:10 andyarvanitis

I opened an issue for the rename, but as for passing the args, I assume this backend needs to change to support something like a separator --, an args flag, or just passing the trailing args on to the process?

For example, running

spago run --node-args "--flag flag-value" --verbose

results in calling

psgo --run Main.main --flag flag-value

joprice avatar Dec 12 '20 15:12 joprice