-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdout of spawned child process is truncated or gone. Extension doesn't get the output of the command. #46002
Comments
Not sure this is gonna help or not: AFAIK, |
@alexandrudima In the tool I'm working on uses spawn instead of spawnSync (which was chosen to simplify the example). The issue is specific to nodeJS running on OSX. nodejs/node#2360 |
ping @joaomoreno Is there some magic sauce you're using when spawning git such that you always get the entire output? |
No, not really... Just regular old spawn. |
@juanfe-google I cannot reproduce the problem you are describing. I'm using an extension with the following contents:
{
"publisher": "alex",
"name": "46002",
"version": "0.0.0",
"engines": {
"vscode": "^1.0.0"
},
"activationEvents": [
"*"
],
"main": "index.js"
}
const cp = require('child_process');
const vscode = require('vscode');
const proc = cp.spawnSync('git', ['status'], {
cwd: vscode.workspace.rootPath
});
console.log(String(proc.stdout)); And I see the entire output of |
@alexandrudima what Mac OS X version are you running? |
I am using macOS High Sierra, Version 10.13.4. Would this be something that reproduces only on certain macOS versions? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Version 1.21.1 (1.21.1)
OSX 10.13.3 (17D102)
The root of the issue is in nodeJS: nodejs/node#6379
Steps to Reproduce:
Example:
const proc = require('child_process').spawnSync('git', ['status']); console.log(String(proc.stdout));
The text was updated successfully, but these errors were encountered: