purpleteam-labs / purpleteam

CLI component of OWASP PurpleTeam
https://owasp.org/www-project-purpleteam
Other
118 stars 15 forks source link

Environment variables not being read when bootsraping the config for the CLI #127

Closed paularah closed 2 years ago

paularah commented 2 years ago

This is kinda related to #113 except in this case for the CLI component. Not sure if I am correct, but the CLI component doesn't rely on DC to receive its env variables so the response to #113 isn't applicable here.

Actual Behavior:

The environment variable to pick the right config file doesn't load up.

Error: ENOENT: no such file or directory, open '/xxxx/purple-team/purpleteam/config/config.undefined.json'

...

Expected Behavior:

NODE_ENV should be cloud, local or localtest

...

Steps to Reproduce:

official docs step for setting up the CLI

...

Environment:

Additional Details:

(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, Github Discussions, links for us to have context, eg. code from your repository, a discussion in stackoverflow, gitter, etc)

Checklist

binarymist commented 2 years ago

The environment variable to pick the right config file doesn't load up.

This is a manual step as detailed. Did you do this step? How exactly are you setting NODE_ENV?

paularah commented 2 years ago

My bad, Missed the step for exporting the env variable. Thanks. I'm closing this