Skip to content

[circle-mlir/infra] Discard output from the cd command#16430

Draft
arkq wants to merge 1 commit into
Samsung:masterfrom
arkq:fix-circle-mlir-infra
Draft

[circle-mlir/infra] Discard output from the cd command#16430
arkq wants to merge 1 commit into
Samsung:masterfrom
arkq:fix-circle-mlir-infra

Conversation

@arkq

@arkq arkq commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

This commit fixes the issue when cd is followed by the pwd in a bash one-liner for getting the location of the script. The cd command can print the destination directory in case when one has the CDPATH environmental variable set which breaks the one-liner functionality.

Copilot AI review requested due to automatic review settings March 10, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a subtle portability bug in the prepare-venv script where the cd command, when the CDPATH environment variable is set, prints the destination directory to stdout. This spurious output gets captured in the command substitution $(...) alongside pwd, corrupting the value of DRIVER_PATH. The fix redirects cd's stdout to /dev/null.

Changes:

  • Redirect stdout of cd to /dev/null in the path-resolution one-liner to prevent CDPATH-triggered output from polluting DRIVER_PATH.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This commit fixes the issue when `cd` is followed by the `pwd` in a
bash one-liner for getting the location of the script. The `cd` command
can print the destination directory in case when one has the CDPATH
environmental variable set which breaks the one-liner functionality.

ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy <a.bokowy@samsung.com>
@arkq arkq force-pushed the fix-circle-mlir-infra branch from 934a454 to fbf39b3 Compare March 10, 2026 13:14
@hseok-oh hseok-oh marked this pull request as draft May 7, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants