File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,13 @@ func Run(cmd *cobra.Command, args []string) {
4444 log .Fatalf ("Failed to parse config file: %s" , err )
4545 }
4646
47+ // AuthToken flag takes preference over token in configuration file.
48+ if AuthToken == "" {
49+ AuthToken = config .Token
50+ } else {
51+ log .Printf ("Using authorization token from flag." )
52+ }
53+
4754 if config .Token != "" {
4855 config .Token = "(redacted)"
4956 }
@@ -84,13 +91,6 @@ func Run(cmd *cobra.Command, args []string) {
8491 log .Fatalf ("Error creating preflight client: %+v" , err )
8592 }
8693 } else {
87- // AuthToken flag takes preference over token in configuration file.
88- if AuthToken == "" {
89- AuthToken = config .Token
90- } else {
91- log .Printf ("Using authorization token from flag." )
92- }
93-
9494 if AuthToken == "" {
9595 log .Fatalf ("Missing authorization token. Cannot continue." )
9696 }
You can’t perform that action at this time.
0 commit comments