Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
b303e7ac
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b303e7ac
编写于
8月 15, 2019
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use safeprocess env
上级
0e56130b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
38 deletion
+8
-38
src/vs/base/common/process.ts
src/vs/base/common/process.ts
+2
-2
src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts
...kbench/contrib/extensions/browser/extensionTipsService.ts
+3
-14
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
...nch/contrib/extensions/browser/extensions.contribution.ts
+3
-1
src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts
...ntrib/extensions/electron-browser/extensionTipsService.ts
+0
-15
src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
...ib/extensions/electron-browser/extensions.contribution.ts
+0
-3
src/vs/workbench/workbench.web.main.ts
src/vs/workbench/workbench.web.main.ts
+0
-3
未找到文件。
src/vs/base/common/process.ts
浏览文件 @
b303e7ac
...
...
@@ -3,11 +3,11 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
isWindows
,
isMacintosh
,
setImmediate
}
from
'
vs/base/common/platform
'
;
import
{
isWindows
,
isMacintosh
,
setImmediate
,
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
interface
IProcess
{
platform
:
string
;
env
:
objec
t
;
env
:
IProcessEnvironmen
t
;
cwd
():
string
;
nextTick
(
callback
:
(...
args
:
any
[])
=>
void
):
number
;
...
...
src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts
浏览文件 @
b303e7ac
...
...
@@ -40,8 +40,8 @@ import { extname } from 'vs/base/common/resources';
import
{
IExeBasedExtensionTip
,
IProductService
}
from
'
vs/platform/product/common/product
'
;
import
{
timeout
}
from
'
vs/base/common/async
'
;
import
{
IWorkspaceStatsService
}
from
'
vs/workbench/contrib/stats/common/workspaceStats
'
;
import
{
Platform
,
setImmediate
,
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
import
{
platform
}
from
'
vs/base/common/process
'
;
import
{
Platform
,
setImmediate
}
from
'
vs/base/common/platform
'
;
import
{
platform
,
env
as
processEnv
}
from
'
vs/base/common/process
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
const
milliSecondsInADay
=
1000
*
60
*
60
*
24
;
...
...
@@ -66,7 +66,7 @@ function caseInsensitiveGet<T>(obj: { [key: string]: T }, key: string): T | unde
return
undefined
;
}
export
abstract
class
Base
ExtensionTipsService
extends
Disposable
implements
IExtensionTipsService
{
export
class
ExtensionTipsService
extends
Disposable
implements
IExtensionTipsService
{
_serviceBrand
:
any
;
...
...
@@ -1020,7 +1020,6 @@ export abstract class BaseExtensionTipsService extends Disposable implements IEx
if
(
!
windowsPath
||
typeof
windowsPath
!==
'
string
'
)
{
return
;
}
const
processEnv
=
this
.
getProcessEnvironment
();
windowsPath
=
windowsPath
.
replace
(
'
%USERPROFILE%
'
,
processEnv
[
'
USERPROFILE
'
]
!
)
.
replace
(
'
%ProgramFiles(x86)%
'
,
processEnv
[
'
ProgramFiles(x86)
'
]
!
)
.
replace
(
'
%ProgramFiles%
'
,
processEnv
[
'
ProgramFiles
'
]
!
)
...
...
@@ -1146,14 +1145,4 @@ export abstract class BaseExtensionTipsService extends Disposable implements IEx
return
this
.
_allIgnoredRecommendations
.
indexOf
(
id
.
toLowerCase
())
===
-
1
;
}
protected
abstract
getProcessEnvironment
():
IProcessEnvironment
;
}
export
class
ExtensionTipsService
extends
BaseExtensionTipsService
implements
IExtensionTipsService
{
protected
getProcessEnvironment
():
IProcessEnvironment
{
return
{};
}
}
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
浏览文件 @
b303e7ac
...
...
@@ -10,7 +10,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import
{
SyncActionDescriptor
,
MenuRegistry
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
ExtensionsLabel
,
ExtensionsChannelId
,
PreferencesLabel
,
IExtensionManagementService
,
IExtensionGalleryService
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IExtensionManagementServerService
}
from
'
vs/workbench/services/extensionManagement/common/extensionManagement
'
;
import
{
IExtensionManagementServerService
,
IExtensionTipsService
}
from
'
vs/workbench/services/extensionManagement/common/extensionManagement
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
as
WorkbenchActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
,
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IOutputChannelRegistry
,
Extensions
as
OutputExtensions
}
from
'
vs/workbench/contrib/output/common/output
'
;
...
...
@@ -45,9 +45,11 @@ import { CancellationToken } from 'vs/base/common/cancellation';
import
{
ExtensionType
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
RemoteExtensionsInstaller
}
from
'
vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller
'
;
import
{
ExtensionTipsService
}
from
'
vs/workbench/contrib/extensions/browser/extensionTipsService
'
;
// Singletons
registerSingleton
(
IExtensionsWorkbenchService
,
ExtensionsWorkbenchService
);
registerSingleton
(
IExtensionTipsService
,
ExtensionTipsService
);
Registry
.
as
<
IOutputChannelRegistry
>
(
OutputExtensions
.
OutputChannels
)
.
registerChannel
({
id
:
ExtensionsChannelId
,
label
:
ExtensionsLabel
,
log
:
false
});
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts
已删除
100644 → 0
浏览文件 @
0e56130b
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
BaseExtensionTipsService
}
from
'
vs/workbench/contrib/extensions/browser/extensionTipsService
'
;
import
{
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
export
class
ExtensionTipsService
extends
BaseExtensionTipsService
{
protected
getProcessEnvironment
():
IProcessEnvironment
{
return
process
.
env
as
IProcessEnvironment
;
}
}
src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
浏览文件 @
b303e7ac
...
...
@@ -21,11 +21,8 @@ import { RuntimeExtensionsInput } from 'vs/workbench/contrib/extensions/electron
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ExtensionsAutoProfiler
}
from
'
vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler
'
;
import
{
IExtensionTipsService
}
from
'
vs/workbench/services/extensionManagement/common/extensionManagement
'
;
import
{
ExtensionTipsService
}
from
'
vs/workbench/contrib/extensions/electron-browser/extensionTipsService
'
;
// Singletons
registerSingleton
(
IExtensionTipsService
,
ExtensionTipsService
);
registerSingleton
(
IExtensionHostProfileService
,
ExtensionHostProfileService
,
true
);
const
workbenchRegistry
=
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
);
...
...
src/vs/workbench/workbench.web.main.ts
浏览文件 @
b303e7ac
...
...
@@ -87,9 +87,6 @@ import 'vs/workbench/contrib/debug/browser/extensionHostDebugService';
import
'
vs/workbench/contrib/webview/browser/webviewService
'
;
import
'
vs/workbench/contrib/webview/browser/webviewEditorService
'
;
// Extensions Management
import
'
vs/workbench/contrib/extensions/browser/extensions.web.contribution
'
;
// Terminal
import
'
vs/workbench/contrib/terminal/browser/terminalNativeService
'
;
import
'
vs/workbench/contrib/terminal/browser/terminalInstanceService
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录