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

test: use env variable to pass value containing user controlled value #49134

Closed
wants to merge 2 commits into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Aug 13, 2023

When tests are run from a cwd that contains special characters in its path, those would be misinterpreted by the shell and make the test fail.

When tests are run from a cwd that contains special characters in its
path, those would be misinterpreted by the shell and make the test fail.
@nodejs-github-bot nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 13, 2023
console.log(stdout);
console.log(stderr);
assert(false, 'this test should fail');
exec(cmdline, { env: { NODE: process.execPath } }, common.mustCall((err, stdout, stderr) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to extend env otherwise the child process will fail to run in , e.g. the shared library CI configurations.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2023
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async_hooks Issues and PRs related to the async hooks subsystem. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants