File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
- VERSION =v0.1.12
1
+ VERSION =v0.1.13
2
2
3
3
OUT_DIR =dist
4
4
YEAR? =$(shell date +"% Y")
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ cf version
23
23
24
24
``` bash
25
25
# download and extract the binary
26
- curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.12 /cf-linux-amd64.tar.gz | tar zx
26
+ curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.13 /cf-linux-amd64.tar.gz | tar zx
27
27
28
28
# move the binary to your $PATH
29
29
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
36
36
37
37
``` bash
38
38
# download and extract the binary
39
- curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.12 /cf-darwin-amd64.tar.gz | tar zx
39
+ curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.13 /cf-darwin-amd64.tar.gz | tar zx
40
40
41
41
# move the binary to your $PATH
42
42
mv ./cf-darwin-amd64 /usr/local/bin/cf
Original file line number Diff line number Diff line change @@ -155,7 +155,13 @@ func (c *Config) GetCurrentContext() *AuthContext {
155
155
if c .contextOverride != "" {
156
156
ctx = c .contextOverride
157
157
}
158
- return c .Contexts [ctx ]
158
+
159
+ authCtx , ok := c .Contexts [ctx ]
160
+ if ! ok {
161
+ log .G ().Fatalf (util .Doc ("Current Codefresh context \" %s\" does not exist. " +
162
+ "You must select another context using '<BIN> config use-context <context>'" ), ctx )
163
+ }
164
+ return authCtx
159
165
}
160
166
161
167
// NewClient creates a new codefresh client for the current context or for
@@ -172,7 +178,7 @@ func (c *Config) DeleteContext(name string) error {
172
178
173
179
delete (c .Contexts , name )
174
180
if c .CurrentContext == name {
175
- log .G ().Warnf (util .Doc ("delete context is set as current context, specify a new current context with '<BIN> config use-context'" ))
181
+ log .G ().Warnf (util .Doc ("Deleted context is set as current context, specify a new current context with '<BIN> config use-context'" ))
176
182
c .CurrentContext = ""
177
183
}
178
184
You can’t perform that action at this time.
0 commit comments