From 0dae7eb233098dc4e756d3536d738f0382ecb083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Tue, 12 May 2020 10:36:11 +0300 Subject: [PATCH] Fix SIGSEGV on update error --- CHANGELOG.md | 4 ++++ cmd/env_update.go | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b15684..7ac5ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## [0.3.1] - 2020-05-12 +### Fixed +- Panic with runtime error on trying to update non existent variable or project + ## [0.3.0] - 2020-05-01 ### Added - New command (`lint`) for validating .gitlab-ci.yml files diff --git a/cmd/env_update.go b/cmd/env_update.go index eae2163..0008323 100644 --- a/cmd/env_update.go +++ b/cmd/env_update.go @@ -35,9 +35,8 @@ var envUpdateCmd = &cobra.Command{ EnvironmentScope: &scope, } - variable, _, err := git.ProjectVariables.UpdateVariable(pid, key, variableOptions, nil) - fmt.Fprintf(os.Stderr, "updating %s...", variable.Key) - + _, _, err := git.ProjectVariables.UpdateVariable(pid, key, variableOptions, nil) + fmt.Fprintf(os.Stderr, "updating %s...", key) if err != nil { fmt.Fprintf(os.Stderr, "%s\n", RED("error")) fmt.Fprintf(os.Stderr, "couldn't update variable: %v\n", err)