-
Notifications
You must be signed in to change notification settings - Fork 824
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
Added a WasmerEnv
abstraction to the CLI
#4013
Conversation
1dd7068
to
4cf66e0
Compare
This PR made me super confused. I think this PR is more complicated than it should. It also ties the WASMER_TOKEN into a Wasmer dir? I don't think this make much sense, what am I missing? |
It may feel overcomplicated, but we want to have a proper abstraction for working with the |
WasmerEnv
abstraction to the CLI
a3d8d56
to
da504ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
The Edge CLI followed a very similar approach.
Left a few comments/discussion points.
fcb7db6
to
2a34a9e
Compare
This adds a
WasmerEnv
struct which abstracts over$WASMER_DIR
and config used to communicate with the registry (i.e. graphql endpoint and tokens).Now, whenever you run a command that interacts with the registry in some way, you should always be able to use the
$WASMER_DIR
,$WASMER_REGISTRY
, and$WASMER_TOKEN
environment variables or their associated command-line arguments.This makes the handling of things like
$WASMER_DIR
,--token
, and--registry
consistent across all our subcommands.Fixes #3993, fixes #3959.