File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,3 +16,19 @@ cover.out
1616completions
1717
1818.vscode
19+
20+ # Build artifacts
21+ bin /
22+
23+ # Environment files
24+ .env *
25+
26+ # OS metadata
27+ .DS_Store
28+ Thumbs.db
29+
30+ # IDE/editor files
31+ .idea /
32+ * .swp
33+ * .swo
34+ * ~
Original file line number Diff line number Diff line change @@ -119,6 +119,11 @@ func (opts *LoginOptions) Run() (err error) {
119119 cfg .Host = config .DefaultHostName
120120 }
121121
122+ // If PAT is passed, start the login flow through PAT (skip interactive prompts)
123+ if opts .PAT != "" {
124+ return opts .startPATLoginFlow (svc , cfg , opts .PAT )
125+ }
126+
122127 // Before starting the login workflow, check here for two conditions:
123128 // Condition 1 : If the token has expired, display a message about it and re-authenticate user
124129 // Condition 2 : If the token has not expired,does the user want to re-authenticate?
@@ -138,11 +143,6 @@ func (opts *LoginOptions) Run() (err error) {
138143 }
139144 }
140145
141- // If PAT is passed, start the login flow through PAT
142- if opts .PAT != "" {
143- return opts .startPATLoginFlow (svc , cfg , opts .PAT )
144- }
145-
146146 // Condition 2
147147 // `startLoginFlow` implements the authentication flow for the CLI
148148 return opts .startLoginFlow (svc , cfg )
You can’t perform that action at this time.
0 commit comments