We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 672f0f9 commit 6ae6779Copy full SHA for 6ae6779
src/gitfetch/cli.py
@@ -441,7 +441,19 @@ def main() -> int:
441
return 0
442
443
except Exception as e:
444
- print(f"Error: {e}", file=sys.stderr)
+ # When debugging, print full traceback to help diagnose issues
445
+ # (useful when users report errors from package builds / other
446
+ # environments where the short error message is not enough).
447
+ try:
448
+ import os
449
+ import traceback
450
+ if os.environ.get('GITFETCH_DEBUG'):
451
+ traceback.print_exc()
452
+ else:
453
+ print(f"Error: {e}", file=sys.stderr)
454
+ except Exception:
455
+ # Fallback to simple message if traceback printing fails
456
457
return 1
458
459
except KeyboardInterrupt:
0 commit comments