Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
GHA: Try strict unhandle promise handling
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Oct 27, 2021
1 parent 03e5642 commit 766910c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v2

- name: Test Node exit status
run: node -e 'throw new Error("foo")' || echo $?

- name: Install requirements
run: |
pip install -r requirements.txt
Expand Down
5 changes: 1 addition & 4 deletions test/jose_interop_vows.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ def spawn(cmd, parse_json):
""" run node command """
#pylint: disable=E1101
with lock:
p = Popen(["node", "-e", "fixtures=require('./test/fixtures');" + cmd], #pylint: disable=consider-using-with
p = Popen(["node", "--unhandled-rejections=strict", "-e", "fixtures=require('./test/fixtures');" + cmd], #pylint: disable=consider-using-with
stdout=PIPE, stderr=PIPE)
(stdout, stderr) = p.communicate()
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
print("stdout: %s" % stdout)
print("stderr: %s" % stderr)
print("returncode: %d" % p.returncode)
if p.returncode == 0:
return json_decode(stdout) if parse_json else stdout
raise Exception(stderr if stderr else ('exited with {}'.format(p.returncode)))
Expand Down

0 comments on commit 766910c

Please sign in to comment.