mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-12 22:08:04 -05:00
Enable search editor in non-HOME envs
This commit is contained in:
@@ -121,9 +121,16 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
|
||||
function relativePathToUri(path: string, resultsUri: vscode.Uri): vscode.Uri | undefined {
|
||||
if (pathUtils.isAbsolute(path)) { return vscode.Uri.file(path); }
|
||||
if (pathUtils.isAbsolute(path)) {
|
||||
return vscode.Uri
|
||||
.file(path)
|
||||
.with({ scheme: process.env.HOME ? 'file' : 'vscode-userdata' });
|
||||
}
|
||||
|
||||
if (path.indexOf('~/') === 0) {
|
||||
return vscode.Uri.file(pathUtils.join(process.env.HOME!, path.slice(2)));
|
||||
return vscode.Uri
|
||||
.file(pathUtils.join(process.env.HOME ?? '', path.slice(2)))
|
||||
.with({ scheme: process.env.HOME ? 'file' : 'vscode-userdata' });
|
||||
}
|
||||
|
||||
const uriFromFolderWithPath = (folder: vscode.WorkspaceFolder, path: string): vscode.Uri =>
|
||||
|
||||
Reference in New Issue
Block a user