Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f09f60

Browse files
author
Elaheh Rashedi
authored
fix for validating cl compiler path (microsoft#5196)
bug fix 5151
1 parentb5fc4cc commit3f09f60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎Extension/src/common.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,9 @@ export function extractCompilerPathAndArgs(inputCompilerPath?: string, inputComp
847847
letadditionalArgs:string[]=[];
848848
letisWindows: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
}elseif(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)){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp