do not apply profile to installation if no installation is selected
This commit is contained in:
parent
4f3f028e9a
commit
c32e6134b3
1 changed files with 4 additions and 2 deletions
|
@ -39,9 +39,11 @@ func (m *rootModel) GetCurrentProfile() *cli.Profile {
|
||||||
func (m *rootModel) SetCurrentProfile(profile *cli.Profile) error {
|
func (m *rootModel) SetCurrentProfile(profile *cli.Profile) error {
|
||||||
m.global.Profiles.SelectedProfile = profile.Name
|
m.global.Profiles.SelectedProfile = profile.Name
|
||||||
|
|
||||||
|
if m.GetCurrentInstallation() != nil {
|
||||||
if err := m.GetCurrentInstallation().SetProfile(m.global, profile.Name); err != nil {
|
if err := m.GetCurrentInstallation().SetProfile(m.global, profile.Name); err != nil {
|
||||||
return errors.Wrap(err, "failed setting profile on installation")
|
return errors.Wrap(err, "failed setting profile on installation")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue