Merge pull request #599 from aluzzardi/edit-name

input edit: allow renaming the environment
This commit is contained in:
Andrea Luzzardi 2021-06-09 12:30:53 -07:00 committed by GitHub
commit 85da25a7ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,7 @@ var editCmd = &cobra.Command{
if err := yaml.Unmarshal(data, &newState); err != nil { if err := yaml.Unmarshal(data, &newState); err != nil {
lg.Fatal().Err(err).Msg("failed to decode file") lg.Fatal().Err(err).Msg("failed to decode file")
} }
st.Name = newState.Name
st.Inputs = newState.Inputs st.Inputs = newState.Inputs
if err := workspace.Save(ctx, st); err != nil { if err := workspace.Save(ctx, st); err != nil {
lg.Fatal().Err(err).Msg("failed to save state") lg.Fatal().Err(err).Msg("failed to save state")