Title: child_process.spawn fails on Windows given a space in both the command and an argument · Issue #7367 · nodejs/node · GitHub
Open Graph Title: child_process.spawn fails on Windows given a space in both the command and an argument · Issue #7367 · nodejs/node
X Title: child_process.spawn fails on Windows given a space in both the command and an argument · Issue #7367 · nodejs/node
Description: Version: 4.4.4, 4.4.7, 5.10.1, 6.2.2 Platform: Windows 7, 64-bit Subsystem: child_process Reproduction of the error: https://gist.github.com/smrq/f028b22bc748af9e68a7 On Windows, child_process.spawn handles the command incorrectly when b...
Open Graph Description: Version: 4.4.4, 4.4.7, 5.10.1, 6.2.2 Platform: Windows 7, 64-bit Subsystem: child_process Reproduction of the error: https://gist.github.com/smrq/f028b22bc748af9e68a7 On Windows, child_process.spaw...
X Description: Version: 4.4.4, 4.4.7, 5.10.1, 6.2.2 Platform: Windows 7, 64-bit Subsystem: child_process Reproduction of the error: https://gist.github.com/smrq/f028b22bc748af9e68a7 On Windows, child_process.spaw...
Opengraph URL: https://github.com/nodejs/node/issues/7367
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"child_process.spawn fails on Windows given a space in both the command and an argument","articleBody":"\u003c!--\nThank you for reporting an issue. Please fill in the template below. If unsure\nabout something, just do as best as you're able.\n\nVersion: usually output of `node -v`\nPlatform: either `uname -a` output, or if Windows, version and 32 or 64-bit\nSubsystem: if known, please specify affected core module name\n\nIf possible, please provide code that demonstrates the problem, keeping it as\nsimple and free of external dependencies as you are able.\n--\u003e\n- **Version**: 4.4.4, 4.4.7, 5.10.1, 6.2.2\n- **Platform**: Windows 7, 64-bit\n- **Subsystem**: `child_process`\n\n\u003c!-- Enter your issue details below this comment. --\u003e\n\nReproduction of the error: https://gist.github.com/smrq/f028b22bc748af9e68a7\n\nOn Windows, `child_process.spawn` handles the command incorrectly when both it and one of its arguments contains a space. So, this works fine:\n\n```\nvar spawn = require('child_process').spawn;\n\nspawn('nospaces.cmd', ['arg with spaces']);\nspawn('command with spaces.cmd', ['nospaces']);\n```\n\nBut this yields `'command' is not recognized as an internal or external command, operable program or batch file.`:\n\n```\nspawn('command with spaces.cmd', ['arg with spaces']);\n```\n\n(This is [node-v0.x-archive #25895](https://github.com/nodejs/node-v0.x-archive/issues/25895), still extant in higher Node.js versions.)\n","author":{"url":"https://github.com/s100","@type":"Person","name":"s100"},"datePublished":"2016-06-22T14:17:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":20},"url":"https://github.com/7367/node/issues/7367"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0f0f414-c438-2628-24de-ec399a1566d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC5C:13BA54:ADE0CE1:B13A1EA:6A50B71F |
| html-safe-nonce | ad55f0fe2f79d35ac835fc7697423844c511ca7a626ba77d4d2bcb385de7ed64 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzVDOjEzQkE1NDpBREUwQ0UxOkIxM0ExRUE6NkE1MEI3MUYiLCJ2aXNpdG9yX2lkIjoiNDU4ODc0NzM1MTUwMjQwMzM1OSIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 3d435c76b92542bea557bbbf14f57a00639e1979ec29c44ba6ae3de363773479 |
| hovercard-subject-tag | issue:161695380 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/7367/issue_layout |
| twitter:image | https://opengraph.githubassets.com/345ce9b6698bfe114c8c7d86ee038967bfd440426dd0dfcd9cfd119613ac9f1f/nodejs/node/issues/7367 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/345ce9b6698bfe114c8c7d86ee038967bfd440426dd0dfcd9cfd119613ac9f1f/nodejs/node/issues/7367 |
| og:image:alt | Version: 4.4.4, 4.4.7, 5.10.1, 6.2.2 Platform: Windows 7, 64-bit Subsystem: child_process Reproduction of the error: https://gist.github.com/smrq/f028b22bc748af9e68a7 On Windows, child_process.spaw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | s100 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 63772747707af4093f0d5fc7aa1bb3bb55f412a9865207c4f421aa34c64cc404 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ded53fe94e3ff1bb4dbf8cc77e285396c92580fb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width