Skip to content

Commit 8e836f3

Browse files
authored
Merge branch 'main' into scan_create_report
2 parents 52e8b84 + 08d925d commit 8e836f3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "0.14.76",
3+
"version": "0.14.77",
44
"description": "CLI tool for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT",

src/commands/fix/pnpm-fix.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ export async function commitAndPushFix(
7474

7575
const baseBranch = process.env['GITHUB_REF_NAME'] ?? 'main'
7676

77-
await spawn('git', ['checkout', baseBranch], { cwd })
77+
try {
78+
await spawn('git', ['checkout', baseBranch], { cwd })
79+
await spawn('git', ['pull', '--ff-only'], { cwd })
80+
} catch (err) {
81+
logger.warn(`Could not switch to ${baseBranch}. Proceeding with current HEAD.`)
82+
}
83+
7884
await spawn('git', ['checkout', '-b', branchName], { cwd })
7985
await spawn('git', ['add', 'package.json', 'pnpm-lock.yaml'], { cwd })
8086
await spawn('git', ['commit', '-m', commitMsg], { cwd })

0 commit comments

Comments
 (0)