From fce8dd14a109615d6a12ec449d5afc656113054c Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Wed, 6 Jul 2022 11:31:47 -0500 Subject: [PATCH] checked type --- .github/workflows/test.yml | 2 +- bin/index.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ab1895..7f42f26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: verbose: true test_npm: - name: python ${{ matrix.python-version }} on ${{ matrix.os }} with node ${{ matrix.node }} + name: node ${{ matrix.node }} with python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/bin/index.js b/bin/index.js index f247119..2ef81fc 100644 --- a/bin/index.js +++ b/bin/index.js @@ -8,7 +8,11 @@ PythonShell.defaultOptions = { }; function clean(output) { - return output.replaceAll('python -m ', ''); + if (typeof output === 'string' || output instanceof String) + { + return output.replaceAll('python -m ', ''); + } + return output; } const yargs = require('yargs');