{"action":"opened","issue":{"url":"https://api.github.com/repos/bazelbuild/rules_nodejs/issues/316","repository_url":"https://api.github.com/repos/bazelbuild/rules_nodejs","labels_url":"https://api.github.com/repos/bazelbuild/rules_nodejs/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/rules_nodejs/issues/316/comments","events_url":"https://api.github.com/repos/bazelbuild/rules_nodejs/issues/316/events","html_url":"https://github.com/bazelbuild/rules_nodejs/issues/316","id":359759933,"node_id":"MDU6SXNzdWUzNTk3NTk5MzM=","number":316,"title":"nodejs_binary fails on windows due to 'No such file or directory'","user":{"login":"alan-agius4","id":17563226,"node_id":"MDQ6VXNlcjE3NTYzMjI2","avatar_url":"https://avatars3.githubusercontent.com/u/17563226?v=4","gravatar_id":"","url":"https://api.github.com/users/alan-agius4","html_url":"https://github.com/alan-agius4","followers_url":"https://api.github.com/users/alan-agius4/followers","following_url":"https://api.github.com/users/alan-agius4/following{/other_user}","gists_url":"https://api.github.com/users/alan-agius4/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-agius4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-agius4/subscriptions","organizations_url":"https://api.github.com/users/alan-agius4/orgs","repos_url":"https://api.github.com/users/alan-agius4/repos","events_url":"https://api.github.com/users/alan-agius4/events{/privacy}","received_events_url":"https://api.github.com/users/alan-agius4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-13T06:31:41Z","updated_at":"2018-09-13T06:31:41Z","closed_at":null,"author_association":"NONE","body":"When using the `nodejs_binary` on windows this is failing due to `No such file or directory` error\r\n\r\n\r\n```bash\r\n bazel run :rollup\r\nINFO: Build options have changed, discarding analysis cache.\r\nINFO: Analysed target //:rollup (10 packages loaded).\r\nINFO: Found 1 target...\r\nTarget //:rollup up-to-date:\r\n  C:/users/alag/_bazel_alag/x34iiuoj/execroot/nodejs_issue/bazel-out/x64_windows-fastbuild/bin/rollup_bin.sh\r\n  C:/users/alag/_bazel_alag/x34iiuoj/execroot/nodejs_issue/bazel-out/x64_windows-fastbuild/bin/rollup\r\n  C:/users/alag/_bazel_alag/x34iiuoj/execroot/nodejs_issue/bazel-out/x64_windows-fastbuild/bin/rollup.exe\r\nINFO: Elapsed time: 2.196s, Critical Path: 0.11s\r\nINFO: 0 processes.\r\nINFO: Build completed successfully, 7 total actions\r\nINFO: Build completed successfully, 7 total actions\r\nUsage: grep [OPTION]... PATTERN [FILE]...\r\nTry 'grep --help' for more information.\r\n/usr/bin/cut: you must specify a list of bytes, characters, or fields\r\nTry '/usr/bin/cut --help' for more information.\r\nC:\\\\users\\\\alag\\\\_bazel_alag\\\\x34iiuoj\\\\execroot\\\\nodejs_issue\\\\bazel-out\\\\x64_windows-fastbuild\\\\bin\\\\rollup: line 37: : No such file or directory\r\n\r\n```\r\n\r\nI debugged this a bit and it looks like at the time the `grep` in this line https://github.com/bazelbuild/rules_nodejs/blob/master/internal/node/node_launcher.sh#L36 executes it returns no result however if I execute the same `grep` when it errors out directly from my terminal it does return the expected string. Maybe it's a race condition?\r\n\r\nI have put together a minimal reproduction https://github.com/alan-agius4/rules_nodejs_error_no_such_file\r\n\r\n"}}
{"actor":{"display_login":"alan-agius4"}}