File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,12 +172,19 @@ export class GitData {
172172 } ) ;
173173 promises . push ( gitEmailPromise ) ;
174174
175- const osUidPromise = Utils . spawn ( [ "id" , "-u" ] , cwd ) . then ( ( { stdout} ) => {
176- this . user . GITLAB_USER_ID = stdout . trimEnd ( ) ;
177- } ) . catch ( ( e ) => {
178- writeStreams . stderr ( chalk `{yellow Using fallback linux user id}\n` ) ;
179- writeStreams . stderr ( chalk `{yellow ${ e . message } \n}` ) ;
180- } ) ;
175+ const osUidPromise = ( async ( ) => {
176+ if ( process . platform === "win32" ) {
177+ // GITLAB_USER_ID is a Unix UID concept; keep default on Windows
178+ return ;
179+ }
180+ try {
181+ const { stdout} = await Utils . spawn ( [ "id" , "-u" ] , cwd ) ;
182+ this . user . GITLAB_USER_ID = stdout . trimEnd ( ) ;
183+ } catch ( e : any ) {
184+ writeStreams . stderr ( chalk `{yellow Using fallback linux user id}\n` ) ;
185+ writeStreams . stderr ( chalk `{yellow ${ e . message } \n}` ) ;
186+ }
187+ } ) ( ) ;
181188 promises . push ( osUidPromise ) ;
182189
183190 await Promise . all ( promises ) ;
You can’t perform that action at this time.
0 commit comments