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

add a charm verify-env like command #73

Open
adam-stokes opened this issue Dec 7, 2015 · 2 comments
Open

add a charm verify-env like command #73

adam-stokes opened this issue Dec 7, 2015 · 2 comments
Milestone

Comments

@adam-stokes
Copy link

Since a few environment variables are recommended to be defined during charm-build it may be nice to have something like charm verify-env to check for common settings to be available to help identify potential problems with a user's setup during build.

For example,

$ charm verify-env

Checking env variables

x LAYER_PATH not found
. INTERFACE_PATH found at $HOME/charms/layers
. JUJU_REPOSITORY found at $HOME/charms

Possible fixes for (found bash shell for $USER):

echo "export LAYER_PATH=$HOME/charms/layers" >> ~/.bashrc

Thoughts?

@bcsaller
Copy link
Contributor

bcsaller commented Dec 7, 2015

Maybe charm build can just include those as INFO level warnings. In truth they are all optional. Mostly we expect things to resolve from interfaces.juju.solutions making LAYER_PATH and INTERFACE_PATH not needed. The -o flag easily replaces JUJU_REPOSITORY if that isn't being used (which implies it might not be part of the developers workflow anyway).

The -l DEBUG flag on charm build does already list these env vars iirc but doesn't include any specific warnings.

The possible fixes idea you have could be included in the output of charm build iif nothing matching an include could be found, and that is a nice addition.

@marcoceppi
Copy link
Contributor

I think having -o default to . is something we may want to reconsider. Where $JUJU_REPOSITORY should be set and is overrideable by -o. A lot of people, myself included, have accidentally built a charm in the layer. This creates a trusty and deps directory and can be a bit distruptive

@marcoceppi marcoceppi added this to the 2.NEXT milestone Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants