File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -55,22 +55,14 @@ func newOCIConfig() (ociConfig, error) {
55
55
config .repository = val
56
56
57
57
val = os .Getenv (envOCIAccessToken )
58
- if val != "" {
59
- base64AccessToken := base64 .StdEncoding .EncodeToString ([]byte (val ))
60
- config .accessToken = base64AccessToken
61
- } else {
62
- val = os .Getenv (envOCIUsername )
63
- if val == "" {
64
- return ociConfig {}, fmt .Errorf ("environment variable %s is not set" , envOCIUsername )
65
- }
66
- config .username = val
58
+ base64AccessToken := base64 .StdEncoding .EncodeToString ([]byte (val ))
59
+ config .accessToken = base64AccessToken
67
60
68
- val = os .Getenv (envOCIPassword )
69
- if val == "" {
70
- return ociConfig {}, fmt .Errorf ("environment variable %s is not set" , envOCIPassword )
71
- }
72
- config .password = val
73
- }
61
+ val = os .Getenv (envOCIUsername )
62
+ config .username = val
63
+
64
+ val = os .Getenv (envOCIPassword )
65
+ config .password = val
74
66
75
67
return config , nil
76
68
}
You can’t perform that action at this time.
0 commit comments