Skip to content

Commit

Permalink
fix: better traces in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbraun89 authored Apr 12, 2023
1 parent c9e29bf commit a859d46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nanolayer/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import typer

import os
from nanolayer.cli.install import app as install_app
from nanolayer.utils.analytics import setup_analytics
from nanolayer.utils.settings import NanolayerSettings
Expand All @@ -8,6 +8,11 @@
resolve_own_release_version,
)

if "__file__" not in globals():
# typer exception handling using __file__ which is
# not available when running in pyoxidizer binary mode
os.environ["_TYPER_STANDARD_TRACEBACK"] = "1"

app = typer.Typer(pretty_exceptions_show_locals=False, pretty_exceptions_short=False)
app.add_typer(install_app, name="install")

Expand Down

0 comments on commit a859d46

Please sign in to comment.