-
Notifications
You must be signed in to change notification settings - Fork 646
Update #workspaceRoot variables reference #1977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 files updated in the PR at the moment are used when developing the extension itself. There are other cases where we are using the $workspaceRoot
in the extension's code base. Would you like to update them as well?
- package.json
- README
- util.ts
In util.ts
, we replace $workspaceRoot
with the actual path. Here, we should support both $workspaceRoot
and $workspaceFolder
Also, dont forget to register for the Microsoft Hacktoberfest :) |
src/util.ts
Outdated
if (toolsGopathForWorkspace.startsWith('~')) { | ||
toolsGopathForWorkspace = path.join(os.homedir(), toolsGopathForWorkspace.substr(1)); | ||
} | ||
if (toolsGopathForWorkspace && toolsGopathForWorkspace.trim() && !/\${workspaceRoot}/.test(toolsGopathForWorkspace)) { | ||
if (toolsGopathForWorkspace && toolsGopathForWorkspace.trim() && !/\${workspaceFolder}/.test(toolsGopathForWorkspace)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should support both $workspaceRoot
and $workspaceFolder
here. Not everyone would have updated their settings.
*/ | ||
export function resolvePath(inputPath: string, workspaceRoot?: string): string { | ||
export function resolvePath(inputPath: string, workspaceFolder?: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolvePath
function was already supporting both $workspaceRoot
and $workspaceFolder
. We want to retain that. So, please revert the changes done to resolvePath
function
Sorry @ramya-rao-a I didn't read it. I see you did everything 😆. |
No problem :) I was going through all the PRs and wrapping them up to be ready for the next update |
Detail: https://code.visualstudio.com/docs/editor/variables-reference#_why-isnt-workspaceroot-documented