mitre / saf_action

GitHub Action for SAF CLI
https://github.com/marketplace/actions/saf-cli-action
Other
6 stars 0 forks source link

Oclif not consuming SAF CLI run command properly #44

Closed em-c-rod closed 1 year ago

em-c-rod commented 1 year ago

When running the SAF CLI run command from a source with has SAF CLI as a dependency, OCLIF is not parsing the inputs properly.

oclif is looking for the saf cli in entirely the wrong location. The assumption is that the cli is not being called programmatically, and so using builtins like “__dirname” or “require.main?.filename” point to the saf cli. When it’s being called by the saf action, those defaults are now instead pointing to the saf action itself instead of to the saf cli. Fix this by passing in to the ‘options’ parameter a string that contains the main entry point for the saf cli.

em-c-rod commented 1 year ago

https://github.com/oclif/core/blob/a18803454449986e03549838ba3928c66f98da37/src/main.ts#L56