Skip to content

add ${execpath} and ${pathSeparator}#8077

Merged
elahehrashedi merged 4 commits intomainfrom
elrashed/execpath
Aug 31, 2021
Merged

add ${execpath} and ${pathSeparator}#8077
elahehrashedi merged 4 commits intomainfrom
elrashed/execpath

Conversation

@elahehrashedi
Copy link
Contributor

bug fix: #7753

@elahehrashedi elahehrashedi requested a review from a team August 31, 2021 02:46
@bobbrow bobbrow changed the title add ${execpath} and ${patheSeparator} add ${execpath} and ${pathSeparator} Aug 31, 2021
}

result["workspaceFolderBasename"] = this.rootUri ? path.basename(this.rootUri.fsPath) : "";
result["execPath"] = process.execPath;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for iterating one comment at a time, but there are a couple more places that need to be updated:

private get AdditionalEnvironment(): { [key: string]: string | string[] } {
return { workspaceFolderBasename: this.Name, workspaceStorage: this.storagePath };
}

delete this.configurationJson.env['workspaceRoot'];
delete this.configurationJson.env['workspaceFolder'];
delete this.configurationJson.env['workspaceFolderBasename'];
delete this.configurationJson.env['default'];

"(?!^workspaceFolder$)(?!^workspaceRoot$)(?!^workspaceFolderBasename$)(?!^default$)(^.+$)": {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for finding those.

@elahehrashedi elahehrashedi merged commit e86fd97 into main Aug 31, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2021
@bobbrow bobbrow deleted the elrashed/execpath branch February 10, 2022 21:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not use ${execPath} in c_cpp_properties.json file!

3 participants