input edit: allow renaming the environment
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
d19dd4d193
commit
fb3e5bbd43
@ -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")
|
||||||
|
Reference in New Issue
Block a user