Skip to content

Commit a1bdf79

Browse files
gergelykbbc2
authored andcommitted
make compatible with pyinstaller
1 parent d677355 commit a1bdf79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dotenv/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _is_interactive():
257257
main = __import__('__main__', None, None, fromlist=['__file__'])
258258
return not hasattr(main, '__file__')
259259

260-
if usecwd or _is_interactive():
260+
if usecwd or _is_interactive() or getattr(sys, 'frozen', False):
261261
# Should work without __file__, e.g. in REPL or IPython notebook.
262262
path = os.getcwd()
263263
else:

0 commit comments

Comments
 (0)