@@ -50,7 +50,7 @@ program.command('activate-license')
5050 Logger . instance . logLevel = LogLevel . DEBUG ;
5151 }
5252
53- Logger . instance . debug ( JSON . stringify ( options ) ) ;
53+ Logger . instance . debugOptions ( options ) ;
5454
5555 const client = new LicensingClient ( ) ;
5656 const licenseStr : string = options . license ?. toString ( ) ?. trim ( ) ;
@@ -79,6 +79,11 @@ program.command('activate-license')
7979 if ( licenseType === LicenseType . professional && ! options . serial ) {
8080 options . serial = await PromptForSecretInput ( 'Serial: ' ) ;
8181 }
82+
83+ // Mask credentials in CI environments before any potential logging
84+ Logger . instance . maskCredential ( options . email ) ;
85+ Logger . instance . maskCredential ( options . password ) ;
86+ Logger . instance . maskCredential ( options . serial ) ;
8287 }
8388
8489 const token = await client . Activate ( {
@@ -106,7 +111,7 @@ program.command('return-license')
106111 Logger . instance . logLevel = LogLevel . DEBUG ;
107112 }
108113
109- Logger . instance . debug ( JSON . stringify ( options ) ) ;
114+ Logger . instance . debugOptions ( options ) ;
110115
111116 const client = new LicensingClient ( ) ;
112117 const licenseStr : string = options . license ?. toString ( ) ?. trim ( ) ;
@@ -134,6 +139,9 @@ program.command('return-license')
134139 Logger . instance . error ( 'Token is required when returning a floating license. Use -t or --token to specify it.' ) ;
135140 process . exit ( 1 ) ;
136141 }
142+
143+ // Mask token in CI environments before any potential logging
144+ Logger . instance . maskCredential ( token ) ;
137145 }
138146
139147 await client . Deactivate ( licenseType , token ) ;
@@ -220,7 +228,7 @@ program.command('hub-install')
220228 Logger . instance . logLevel = LogLevel . DEBUG ;
221229 }
222230
223- Logger . instance . debug ( JSON . stringify ( options ) ) ;
231+ Logger . instance . debugOptions ( options ) ;
224232
225233 if ( options . autoUpdate === true && options . hubVersion ) {
226234 Logger . instance . error ( 'Cannot use --auto-update with --hub-version.' ) ;
@@ -252,7 +260,7 @@ program.command('hub')
252260 Logger . instance . logLevel = LogLevel . DEBUG ;
253261 }
254262
255- Logger . instance . debug ( JSON . stringify ( { args, options } ) ) ;
263+ Logger . instance . debugOptions ( { args, options } ) ;
256264
257265 const unityHub = new UnityHub ( ) ;
258266 const output = await unityHub . Exec ( args , { silent : false , showCommand : Logger . instance . logLevel === LogLevel . DEBUG } ) ;
@@ -280,7 +288,7 @@ program.command('setup-unity')
280288 Logger . instance . logLevel = LogLevel . DEBUG ;
281289 }
282290
283- Logger . instance . debug ( JSON . stringify ( options ) ) ;
291+ Logger . instance . debugOptions ( options ) ;
284292
285293 let unityProject : UnityProject | undefined ;
286294
@@ -373,7 +381,7 @@ program.command('uninstall-unity')
373381 Logger . instance . logLevel = LogLevel . DEBUG ;
374382 }
375383
376- Logger . instance . debug ( JSON . stringify ( options ) ) ;
384+ Logger . instance . debugOptions ( options ) ;
377385
378386 let unityEditor : UnityEditor | undefined ;
379387 const unityVersionStr = options . unityVersion ?. toString ( ) ?. trim ( ) ;
@@ -472,7 +480,7 @@ program.command('run')
472480 Logger . instance . logLevel = requestedLogLevel ;
473481 }
474482
475- Logger . instance . debug ( JSON . stringify ( { options, args } ) ) ;
483+ Logger . instance . debugOptions ( { options, args } ) ;
476484
477485 let unityEditor : UnityEditor | undefined ;
478486 const editorPath = options . unityEditor ?. toString ( ) ?. trim ( ) || process . env . UNITY_EDITOR_PATH || undefined ;
@@ -540,7 +548,7 @@ program.command('list-project-templates')
540548 Logger . instance . logLevel = LogLevel . DEBUG ;
541549 }
542550
543- Logger . instance . debug ( JSON . stringify ( options ) ) ;
551+ Logger . instance . debugOptions ( options ) ;
544552
545553 const unityVersionStr = options . unityVersion ?. toString ( ) ?. trim ( ) ;
546554
@@ -593,7 +601,7 @@ program.command('create-project')
593601 Logger . instance . logLevel = LogLevel . DEBUG ;
594602 }
595603
596- Logger . instance . debug ( JSON . stringify ( options ) ) ;
604+ Logger . instance . debugOptions ( options ) ;
597605
598606 const unityVersionStr = options . unityVersion ?. toString ( ) ?. trim ( ) ;
599607
@@ -665,7 +673,7 @@ program.command('open-project')
665673 Logger . instance . logLevel = LogLevel . DEBUG ;
666674 }
667675
668- Logger . instance . debug ( JSON . stringify ( options ) ) ;
676+ Logger . instance . debugOptions ( options ) ;
669677 const projectPath = options . unityProject ?. toString ( ) ?. trim ( ) || process . env . UNITY_PROJECT_PATH || undefined ;
670678 const unityProject = await UnityProject . GetProject ( projectPath ) ;
671679
@@ -731,7 +739,7 @@ program.command('sign-package')
731739 Logger . instance . logLevel = LogLevel . DEBUG ;
732740 }
733741
734- Logger . instance . debug ( JSON . stringify ( options ) ) ;
742+ Logger . instance . debugOptions ( options ) ;
735743
736744 const packagePath = path . normalize ( options . package ?. toString ( ) ?. trim ( ) ) ;
737745
@@ -796,6 +804,11 @@ program.command('sign-package')
796804 process . exit ( 1 ) ;
797805 }
798806
807+ // Mask credentials in CI environments before any potential logging
808+ Logger . instance . maskCredential ( username ) ;
809+ Logger . instance . maskCredential ( password ) ;
810+ Logger . instance . maskCredential ( organization ) ;
811+
799812 // must use a unity editor 6000.3 or newer
800813 const unityVersion = new UnityVersion ( '6000.3' ) ;
801814 const unityHub = new UnityHub ( ) ;
0 commit comments