mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
chore: do not auto migrate on manual switch
This commit is contained in:
parent
6fcae4207e
commit
bfca351796
|
@ -75,7 +75,8 @@ func (cfg *Config) exitWithError(err error) {
|
||||||
// LoadConfig returns the default configuration including possible user overrides
|
// LoadConfig returns the default configuration including possible user overrides
|
||||||
func LoadConfig(env environment.Environment) *Config {
|
func LoadConfig(env environment.Environment) *Config {
|
||||||
cfg := loadConfig(env)
|
cfg := loadConfig(env)
|
||||||
if cfg.Version != configVersion {
|
// only migrate automatically when the switch isn't set
|
||||||
|
if !*env.Args().Migrate && cfg.Version != configVersion {
|
||||||
cfg.Backup()
|
cfg.Backup()
|
||||||
cfg.Migrate(env)
|
cfg.Migrate(env)
|
||||||
cfg.Write()
|
cfg.Write()
|
||||||
|
|
Loading…
Reference in a new issue