File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import { debugDir , debugFn , isDebug } from '@socketsecurity/registry/lib/debug'
22import { normalizePath } from '@socketsecurity/registry/lib/path'
3- import { spawn } from '@socketsecurity/registry/lib/spawn'
3+ import { isSpawnError , spawn } from '@socketsecurity/registry/lib/spawn'
44
55import constants from '../constants.mts'
66
@@ -159,6 +159,12 @@ export async function gitPushBranch(
159159 'error' ,
160160 `caught: git push --force --set-upstream origin ${ branch } failed` ,
161161 )
162+ if ( isSpawnError ( e ) && e . code === 128 ) {
163+ debugFn (
164+ 'error' ,
165+ 'denied: token requires contents: write; pull-requests: write permissions' ,
166+ )
167+ }
162168 debugDir ( 'inspect' , { error : e } )
163169 }
164170 return false
You can’t perform that action at this time.
0 commit comments