Skip to content

Commit

Permalink
X
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-bloch committed Feb 21, 2024
1 parent 9616f35 commit 4e13429
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions psh/tools/psh.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def assert_exec(pexpect_proc, prog, expected="", msg=""):


def get_exit_code(pexpect_proc):
assert_prompt(pexpect_proc)
pexpect_proc.sendline("echo $?")
msg = "Checking passed command return code failed, one or more digits not found"
assert pexpect_proc.expect([rf"(\d+?){EOL}", pexpect.TIMEOUT, pexpect.EOF]) == 0, msg
Expand Down

0 comments on commit 4e13429

Please sign in to comment.