| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0e1963c commit d99f175
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,7 @@ const { spawnSync } = require('child_process'); | |||
| 12 | 12 | for (const code of [ | |
| 13 | 13 | `require('fs').realpath('/dev/stdin', (err, resolvedPath) => { | |
| 14 | 14 | if (err) { | |
| 15 | + console.error(err); | ||
| 15 | 16 | process.exit(1); | |
| 16 | 17 | } | |
| 17 | 18 | if (resolvedPath) { | |
@@ -22,11 +23,17 @@ for (const code of [ | |||
| 22 | 23 | if (require('fs').realpathSync('/dev/stdin')) { | |
| 23 | 24 | process.exit(2); | |
| 24 | 25 | } | |
| 25 | - } catch { | ||
| 26 | + } catch (e) { | ||
| 27 | + console.error(e); | ||
| 26 | 28 | process.exit(1); | |
| 27 | 29 | }` | |
| 28 | 30 | ]) { | |
| 29 | - assert.strictEqual(spawnSync(process.execPath, ['-e', code], { | ||
| 31 | + const child = spawnSync(process.execPath, ['-e', code], { | ||
| 30 | 32 | stdio: 'pipe' | |
| 31 | - }).status, 2); | ||
| 33 | + }); | ||
| 34 | + if (child.status !== 2) { | ||
| 35 | + console.log(code); | ||
| 36 | + console.log(child.stderr.toString()); | ||
| 37 | + } | ||
| 38 | + assert.strictEqual(child.status, 2); | ||
| 32 | 39 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments