Skip to content

Clone dev packages and check out specific version based on config#2166

Open
tjcouch-sil wants to merge 4 commits intomainfrom
upgrade-platform-yalc
Open

Clone dev packages and check out specific version based on config#2166
tjcouch-sil wants to merge 4 commits intomainfrom
upgrade-platform-yalc

Conversation

@tjcouch-sil
Copy link
Copy Markdown
Member

@tjcouch-sil tjcouch-sil commented Mar 31, 2026

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment on lines +86 to +94
try {
execSync('git pull', { stdio: 'inherit', cwd: repoPath });
} catch {
console.log(
`Could not pull in ${
folder
} — likely a detached HEAD (tag or commit hash). Continuing with checked-out revision.`,
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 git pull failures silently swallowed regardless of cause

The catch block on git pull (lines 88-94) catches ALL errors and logs a message assuming the failure is due to a detached HEAD. However, git pull can also fail on a branch due to merge conflicts (e.g., if a developer has unpushed local commits on the tracked branch that diverge from origin) or authentication errors. Since git status --porcelain at dev-package-utils.ts:73 only checks for uncommitted changes and does not detect unpushed commits, this scenario is reachable. When git pull fails silently on a branch, the build proceeds with stale/incompatible code and a misleading log message ("likely a detached HEAD"), making the root cause difficult to diagnose.

Suggested improvement

Distinguish detached HEAD from other failures, e.g. by checking git symbolic-ref HEAD before pulling, or by inspecting the error message in the catch block and only suppressing the specific "not on a branch" error.

Prompt for agents
In .erb/scripts/dev-package-utils.ts, lines 86-94, the catch block around `git pull` silently swallows all errors, assuming they indicate a detached HEAD. Instead, before calling `git pull`, check whether the repo is actually on a branch (e.g., run `git symbolic-ref --quiet HEAD` and check its exit code). If on a branch, do NOT catch `git pull` errors — let them propagate so merge conflicts or other issues are surfaced. Only skip `git pull` (without try/catch) when in detached HEAD state.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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