spago icon indicating copy to clipboard operation
spago copied to clipboard

Issue parsing execArgs flag

Open imsaravana369 opened this issue 1 year ago • 1 comments

In commands such as run and test, the execArgs flag is designed to accept additional arguments. However, when no arguments are explicitly passed for execArgs, it is still being parsed as Just [] instead of Nothing

  • Consequently, any configuration set in the exec_args section of spago.yaml is not being utilized. Because we always give preference to the explicitly passed args.
execArgs = fromMaybe [] (runArgs.execArgs <|> runConf _.exec_args)

here

  • runArgs.execArgs is the one we get from the option parser
  • exec_args is the one from config

Fix:

  • To Change the execArgs parsing logic.
  • Or should we combine both the config args and the explicitly parsed args?

imsaravana369 avatar Feb 26 '24 14:02 imsaravana369

Created a PR: https://github.com/purescript/spago/pull/1188#issue-2154356812

imsaravana369 avatar Feb 26 '24 14:02 imsaravana369

Fixed in #1188

f-f avatar Mar 01 '24 11:03 f-f