Skip to content
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

Remove direct writes to process.stderr #1875

Open
t1m0thyj opened this issue Mar 15, 2023 · 0 comments · May be fixed by #2454
Open

Remove direct writes to process.stderr #1875

t1m0thyj opened this issue Mar 15, 2023 · 0 comments · May be fixed by #2454
Assignees
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases

Comments

@t1m0thyj
Copy link
Member

In several places we write output to process.stderr, which means that in daemon mode the output will be printed directly from the server rather than being passed on to the client.

We should consider replacing it with logic like the following:

const daemonStream = ImperativeConfig.instance.daemonContext?.stream;
if (daemonStream != null) {
    daemonStream.write(DaemonRequest.create({ stderr: stderrBuffer.toString() }));
} else {
    process.stderr.write(stderrBuffer);
}

https://github.com/zowe/imperative/blob/7571d180d54da03affe6e6e178a0617fc4d555f5/packages/imperative/src/plugins/utilities/NpmFunctions.ts#L45
https://github.com/zowe/imperative/blob/7571d180d54da03affe6e6e178a0617fc4d555f5/packages/imperative/src/plugins/utilities/npm-interface/uninstall.ts#L60
https://github.com/zowe/imperative/blob/7571d180d54da03affe6e6e178a0617fc4d555f5/packages/cmd/src/yargs/YargsConfigurer.ts#L87

@t1m0thyj t1m0thyj added bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases labels Mar 15, 2023
@t1m0thyj t1m0thyj changed the title Remove references to process.stderr Remove direct writes to process.stderr Mar 15, 2023
@awharn awharn transferred this issue from zowe/imperative Nov 13, 2023
@t1m0thyj t1m0thyj moved this to Low Priority in Zowe CLI Squad Dec 26, 2023
@pujal0909 pujal0909 linked a pull request Mar 7, 2025 that will close this issue
4 tasks
@t1m0thyj t1m0thyj linked a pull request Mar 12, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Projects
Status: Low Priority
Development

Successfully merging a pull request may close this issue.

2 participants