File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -407,10 +407,15 @@ export async function publish(args) {
407407 else if ( args . tag ) {
408408 const cmd = `npm dist-tag add ${ packageJson . name } @${ packageJson . version } ${ args . tag } ` ;
409409 logger . info ( `Setting tag '${ args . tag } ' for package ${ packageJson . name } @${ packageJson . version } (${ cmd } )` ) ;
410- const res = tryExecSync ( cmd , {
410+ // For OIDC: don't pass custom env - let npm inherit the full parent environment
411+ // This ensures all OIDC-related env vars are available to npm
412+ const execOptions = {
411413 cwd : packageDirectory ,
412- env : env
413- } ) ;
414+ } ;
415+ if ( ! args . useOidc ) {
416+ execOptions . env = env ;
417+ }
418+ const res = tryExecSync ( cmd , execOptions ) ;
414419 if ( res . success ) {
415420 logger . info ( `Successfully set tag '${ args . tag } ' for package ${ packageJson . name } @${ packageJson . version } ` ) ;
416421 if ( webhook ) {
You can’t perform that action at this time.
0 commit comments