Skip to content

Commit 8efe959

Browse files
committed
Don't commit .bundle or vendor/bundle into update branches
\`git add -A\` was staging bundler files that \`ruby/setup-ruby\` writes into the workspace (.bundle/config, vendor/bundle/). These got committed into the first importmap branch. On the next checkout back to origin/main, git deleted them — and with the bundle path config and cached gems gone, subsequent \`bin/importmap pin\` calls failed with "Could not find gems". Stage only the paths \`bin/importmap pin\` is expected to modify: \`config/importmap.rb\` and \`vendor/javascript/\` (for vendoring mode).
1 parent ce75bf9 commit 8efe959

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/git_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def checkout_fresh_branch(branch:, base:)
3030
# if a commit was actually created, false if there was nothing to
3131
# commit (which usually means `bin/importmap pin` was a no-op).
3232
def commit_all(message:)
33-
@runner.run!("git", "add", "-A")
33+
@runner.run!("git", "add", "config/importmap.rb", "vendor/javascript")
3434
# `git diff --cached --quiet` exits 0 if there are no staged changes.
3535
diff = @runner.run("git", "diff", "--cached", "--quiet")
3636
return false if diff.success?

0 commit comments

Comments
 (0)