File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -606,7 +606,8 @@ export function timeout(millis: number): Promise<void> {
606606}
607607
608608/**
609- * Expands ~ to homedir in non-Windows platform and resolves ${workspaceFolder} or ${workspaceRoot}
609+ * Expands ~ to homedir in non-Windows platform and resolves
610+ * ${workspaceFolder}, ${workspaceRoot} and ${workspaceFolderBasename}
610611 */
611612export function resolvePath ( inputPath : string , workspaceFolder ?: string ) : string {
612613 if ( ! inputPath || ! inputPath . trim ( ) ) {
@@ -621,6 +622,7 @@ export function resolvePath(inputPath: string, workspaceFolder?: string): string
621622
622623 if ( workspaceFolder ) {
623624 inputPath = inputPath . replace ( / \$ { workspaceFolder} | \$ { workspaceRoot} / g, workspaceFolder ) ;
625+ inputPath = inputPath . replace ( / \$ { workspaceFolderBasename} / g, path . basename ( workspaceFolder ) ) ;
624626 }
625627 return resolveHomeDir ( inputPath ) ;
626628}
You can’t perform that action at this time.
0 commit comments