Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Dec 3, 2023
1 parent 2da52d9 commit efdfcfa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions scripts/toltec/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ def get_declarations(src: str) -> Tuple[Variables, Functions]:
"PATH": os.environ["PATH"],
}

declarations_subshell = (
subprocess.run( # pylint:disable=subprocess-run-check
["/usr/bin/env", "bash"],
input=src.encode(),
capture_output=True,
env=env,
)
declarations_subshell = subprocess.run( # pylint:disable=subprocess-run-check
["/usr/bin/env", "bash"],
input=src.encode(),
capture_output=True,
env=env,
)

if declarations_subshell.returncode == 2:
Expand All @@ -131,9 +129,9 @@ def get_declarations(src: str) -> Tuple[Variables, Functions]:
functions = {}

while True:
token = lexer.get_token() or ""
token = lexer.get_token()

if token == lexer.eof:
if token == lexer.eof or token is None:
break

next_token = lexer.get_token() or ""
Expand Down

0 comments on commit efdfcfa

Please sign in to comment.