Closed evanshortiss closed 6 years ago
Hi @evanshortiss,
It is not the way expected to use it as a lib. It was described in https://github.com/feedhenry/fh-fhc/pull/384 and in the README. Following an example of fhc used as a dependency.
fhc.env.list({app:'hgxe4z5j2b6owln5vw6qvx5i', env:'dev', json : true }, function (err,res) {
return cb( res);
});
For further information check the README here.
Please, let me know if you still facing issues or have any other concern.
Cheers, Camila Macedo
I'm working on a PR that caused me to run into this issue. When using fhc as a CLI the following works fine:
Using it as a module:
causes it to return an error:
I believe I have tracked it down to the
_normaliseFlagsAndArs
inargs.js
. This function incorrectly assumes that FHC will be used as a CLI only and usesprocess.argv
instead of theargsIntoCommand
variable which should be used (as far as I can tell).