Skip to content

setup.sh: make submodule checks independent of working directory - #4488

Open
GITTYCAT12 wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
GITTYCAT12:fix/setup-from-any-directory
Open

GITTYCAT12 wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
GITTYCAT12:fix/setup-from-any-directory

Conversation

@GITTYCAT12

Copy link
Copy Markdown

What does this PR do?

setup.sh says it can be invoked from any working directory, but the initial git submodule status and git submodule update commands run against the caller's current directory rather than the ORFS checkout.

This can make setup fail when the script is launched from outside the repository.

This PR uses the already-resolved DIR path with git -C for both submodule operations, keeping the setup behavior independent of the caller's working directory.

Validation

The change is intentionally limited to the submodule commands. I would appreciate CI/maintainer validation on the supported Linux and macOS setup paths, particularly when invoking setup.sh from a directory outside the ORFS checkout.

Related behavior

The script already resolves its own location into DIR and uses that path for the dependency installer, so this keeps the submodule handling consistent with the rest of the script.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates setup.sh to run git submodule commands within the directory specified by $DIR using the -C flag. Feedback is provided to use the parameter expansion "${SUDO_USER:-root}" instead of $SUDO_USER to prevent unbound variable errors when running the script as root under set -euo pipefail.

Comment thread setup.sh Resolved
@openroad-ci

openroad-ci commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 9cecca1 · Jenkins build #25 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

@GITTYCAT12 GITTYCAT12 closed this Sep 2, 2026
@GITTYCAT12 GITTYCAT12 reopened this Sep 2, 2026
@maliberty

Copy link
Copy Markdown
Member

Sorry this got a bit lost. The DCO needs fixing before it can be merged.

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.

3 participants