-
Notifications
You must be signed in to change notification settings - Fork 93
Move all configuration to the global config dir #2079
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
base: main
Are you sure you want to change the base?
Conversation
92854ce
to
6912b5d
Compare
6912b5d
to
bfcb357
Compare
💯 So awesome we're doing this now. As a user reading the output messages indicating that there's a local config present that needs migrating, I'd benefit from understanding what's in the local config. If it's too difficult to identify what's in the config, maybe:
|
@leighmcculloch ended up going with this: $ stellar keys address me
⚠️ A local config was found at ".stellar".
This behavior is deprecated and will be removed in the future.
Run `stellar config migrate` to move the configuration to "/Users/fnando/.config/stellar". |
What
Add change that will deprecate local config directories in p23. This also adds a config migration command
stellar config migrate
that moves over configs from local to globalWrite operations (create/delete) are only done in global dir, while read operations (e.g. fetch alias) use both local (have priority, like in older versions) and global.
If local gets hit, it will print a warning.
Examples of running commands:
v23:
No warning when using alice-global
User can migrate their configurations using
stellar config migrate
command. (This command takes care of all configs at once, but we might change it in the future)This command will be available past protocol-23
Given local:
And global:
We can run migration:
As the result, local config will be deleted and global will look like:
All duplicated files have prefix (unique to original path) to avoid accidental overriding when migrating multiple local configs (e.g. if there are multiple alice keys, one per project) -- user can rename those files later based.
Running it again will simply print that no migration is needed
In addition,
--config-dir
allows to change config directory from global:Finally, passing
--global
flag emits warning:Why
#1993
Known limitations
Warnings can not be muted with -q flag
Sometimes warnings are printed multiple times (e.g. contract deploy)