Skip to content

Commit

Permalink
javascript: check NODE_BIN in os.environ dict instead of attr (#100)
Browse files Browse the repository at this point in the history
Fixes #99 by checking os.environ dictionary for a custom NODE_BIN. Retains the attribute check for compatibility.
  • Loading branch information
extremeheat committed Sep 27, 2023
1 parent 1e7a6a4 commit 054332f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/javascript/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Special handling for IPython jupyter notebooks
stdout = sys.stdout
notebook = False
NODE_BIN = getattr(os.environ, "NODE_BIN") if hasattr(os.environ, "NODE_BIN") else "node"
NODE_BIN = os.environ.get('NODE_BIN') or (getattr(os.environ, "NODE_BIN") if hasattr(os.environ, "NODE_BIN") else "node")


def is_notebook():
Expand Down

0 comments on commit 054332f

Please sign in to comment.