Skip to content

fix(setup): make bin root detection CDPATH-safe#1250

Open
Gujiassh wants to merge 1 commit intogarrytan:mainfrom
Gujiassh:fix/cdpath-safe-bin-root
Open

fix(setup): make bin root detection CDPATH-safe#1250
Gujiassh wants to merge 1 commit intogarrytan:mainfrom
Gujiassh:fix/cdpath-safe-bin-root

Conversation

@Gujiassh
Copy link
Copy Markdown

@Gujiassh Gujiassh commented Apr 28, 2026

Summary

  • make repo root discovery ignore CDPATH output in the shell helper scripts under bin/
  • keep the fix narrowly scoped to the root path detection used by setup, teardown, telemetry, uninstall, dashboard, and update-check commands
  • preserve existing behavior while avoiding stray path output when CDPATH is set

Testing

  • bash -n bin/dev-setup bin/dev-teardown bin/gstack-community-dashboard bin/gstack-telemetry-log bin/gstack-telemetry-sync bin/gstack-uninstall bin/gstack-update-check
  • CDPATH='.:/tmp' GSTACK_DIR='' bin/gstack-update-check --force

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Redirect the bootstrap cd command to /dev/null so CDPATH cannot inject an extra path line into GSTACK_DIR and corrupt script-local path resolution.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

1 participant