dx: local-ci.sh wasn't always able to use the correct e2e snapshots
Massimo Melina committed
Apr 16, 2026 at 17:01 UTC
6e51ebe5199497cd3ce7c89255daeea0d851cf01
1 file changed
+3
-4
playwright.config.ts
+3
-4
@@ -122,9 +122,8 @@ function getSnapshotBranch() {
122
123
function getGitBranchName() {
124
try {
125
- return execSync('git branch --show-current', { encoding: 'utf8' }).trim()
126
- }
127
- catch {
128
- return ''
125
+ return execSync('git branch -a --contains HEAD', { encoding: 'utf8' }).trim().split('\n').at(-1)?.trim()
126
+ .replace(/^(\*\s*)?(remotes\/[^/]+\/)?/, '')
127
}
128
+ catch {}
129
}