File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -847,9 +847,9 @@ export function extractCompilerPathAndArgs(inputCompilerPath?: string, inputComp
847847 let additionalArgs : string [ ] = [ ] ;
848848 let isWindows : boolean = os . platform ( ) === 'win32' ;
849849 if ( compilerPath ) {
850- if ( compilerPath === "cl.exe" ) {
850+ if ( compilerPath . endsWith ( "\\cl.exe" ) || compilerPath . endsWith ( "/cl.exe" ) || compilerPath === "cl.exe" ) {
851851 // Input is only compiler name, this is only for cl.exe
852- compilerName = compilerPath ;
852+ compilerName = path . basename ( compilerPath ) ;
853853
854854 } else if ( compilerPath . startsWith ( "\"" ) ) {
855855 // Input has quotes around compiler path
@@ -881,6 +881,7 @@ export function extractCompilerPathAndArgs(inputCompilerPath?: string, inputComp
881881 additionalArgs = additionalArgs . filter ( ( arg : string ) => arg . trim ( ) . length !== 0 ) ; // Remove empty args.
882882 compilerPath = potentialCompilerPath ;
883883 }
884+ compilerName = path . basename ( compilerPath ) ;
884885 }
885886 // Get compiler name if there are no args but path is valid or a valid path was found with args.
886887 if ( compilerPath === "cl.exe" || checkFileExistsSync ( compilerPath ) ) {
You can’t perform that action at this time.
0 commit comments