Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citizen module publish execution requires extraneous ENV variables - Citizen v0.6.0 #117

Open
abourget-cainc opened this issue May 17, 2023 · 0 comments

Comments

@abourget-cainc
Copy link

Observed when running v0.6.0 cli to publish a module as:

citizen module -v testmod testmod aws 0.0.1

The cli would throw and error if any of the following ENVs are not set:

CITIZEN_DATABASE_TYPE=mysql
CITIZEN_STORAGE=s3
CITIZEN_ADDR=https://registry.address.com/

Obviously the CITIZEN_ADDR needs to be specified, but the other ENV vars are server mode specific. It looks like this was introduced in v0.6.0 with these exception blocks:

throw new Error(`unknown storage type: ${t}. Please set CITIZEN_STORAGE environment variable.`);

throw new Error(`unknown database type: ${t}. Please set CITIZEN_DATABASE_TYPE environment variable.`);

I was able to work around this by adding conditional logic to only throw the exceptions when running in server mode, and ignoring that block when running module/provider mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant