Commit 65abb85
fix(cli): Enable debug before doing auth
Authentication issues are currently hard to debug since `--debug` only
has effect after `gl.auth()` has been called.
For example, a 401 error is printed without any details about the actual
HTTP request being sent:
$ gitlab --debug --server-url https://gitlab.com current-user get
401: 401 Unauthorized
By moving the call to `gl.enable_debug()` the usual debug logs get
printed before the final error message.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>1 parent d8a657b commit 65abb85Copy full SHA for 65abb85
File tree
Expand file treeCollapse file tree
1 file changed
+2
-3
lines changedOpen diff view settings
Filter options
- gitlab
Expand file treeCollapse file tree
1 file changed
+2
-3
lines changedOpen diff view settings
Collapse file
+2-3Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
366 | 366 | |
367 | 367 | |
368 | 368 | |
| 369 | + |
| 370 | + |
369 | 371 | |
370 | 372 | |
371 | 373 | |
372 | 374 | |
373 | 375 | |
374 | | - |
375 | | - |
376 | | - |
377 | 376 | |
378 | 377 | |
379 | 378 | |
0 commit comments