Skip to content

Commit c5515e0

Browse files
authored
Merge pull request #3682 from buildkite/fix/nil-response-metadata-get
2 parents ed463eb + ca89b3f commit c5515e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clicommand/meta_data_get.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ var MetaDataGetCommand = cli.Command{
9898
//
9999
// We also use `IsSet` instead of `cfg.Default != ""`
100100
// to allow people to use a default of a blank string.
101-
if resp.StatusCode == 404 && c.IsSet("default") {
101+
if resp != nil && resp.StatusCode == 404 && c.IsSet("default") {
102102
l.Warn(
103103
"No meta-data value exists with key %q, returning the supplied default %q",
104104
cfg.Key,

0 commit comments

Comments
 (0)