danger local fails to run in WSL
See original GitHub issueI’ve been trying to migrate to using Danger-JS for some of my projects, however i’m having a hard time running danger in my environment. I am running danger inside of the Windows Subsystem for Linux (WSL), and the compatibility layer there seems to be what is tripping me up in understanding what is going on. The behavior I’m seeing is identical to what is described here: https://github.com/Microsoft/WSL/issues/1774
internal/process/stdio.js:99
throw new errors.Error('ERR_UNKNOWN_STDIN_TYPE');
^
Error [ERR_UNKNOWN_STDIN_TYPE]: Unknown stdin file type
at process.getStdin [as stdin] (internal/process/stdio.js:99:15)
at Object.<anonymous> (/home/demi/.nvm/versions/node/v8.0.0/lib/node_modules/danger/node_modules/get-stdin/index.js
:2:20)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/demi/.nvm/versions/node/v8.0.0/lib/node_modules/danger/distribution/commands/danger-ru
nner.js:44:16)
The existing work-around seems to be setting a timeout on the end()
call to any stdin
, which I’ve tried to add for the instance it gets used in commands/utils/runDangerSubprocess.ts
, but was unable to properly verify if that had any impact – I ran yarn link
in my checkout of danger then yarn link danger
in my project directory, since my understanding is that doing that would allow me to have yarn execute the modified version of danger-js, and not the one it installed into my node_modules/
; however that didn’t seem to make a difference. Since I am not familiar with Typescript, or working with Node I wasn’t sure what would be the correct fix or course of action here. I figured the least I could do was document this incompatibility incase others run into it.
OS Info:
Windows 10 1709 (16299.309)
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
Danger Version: 3.2.0
Yarn Version: 1.5.1
Node Version: v8.0.0
and v8.10.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Still happening for me.
Closing this as it seems like this particular issue has been resolved in a recent update.