Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gzupanda
code-server
提交
58f7f5b7
C
code-server
项目概览
gzupanda
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
58f7f5b7
编写于
10月 25, 2019
作者:
A
Asher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Properly fix blank --cert flag
See #1109.
上级
b8e6369f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
3 deletion
+15
-3
scripts/vscode.patch
scripts/vscode.patch
+10
-1
src/node/cli.ts
src/node/cli.ts
+5
-2
未找到文件。
scripts/vscode.patch
浏览文件 @
58f7f5b7
...
...
@@ -87,7 +87,7 @@ index 990755c4f3..06449bb9cb 100644
+ extraBuiltinExtensionPaths: string[];
}
diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts
index 3e48fe4ddd..
e0962b8736
100644
index 3e48fe4ddd..
2212ff5471
100644
--- a/src/vs/platform/environment/node/argv.ts
+++ b/src/vs/platform/environment/node/argv.ts
@@ -58,6 +58,8 @@
export const OPTIONS: OptionDescriptions<Required<ParsedArgs>> = {
...
...
@@ -99,6 +99,15 @@ index 3e48fe4ddd..e0962b8736 100644
'list-extensions': { type: 'boolean', cat: 'e', description: localize('listExtensions', "List the installed extensions.") },
'show-versions': { type: 'boolean', cat: 'e', description: localize('showVersions', "Show versions of installed extensions, when using --list-extension.") },
'category': { type: 'string', cat: 'e', description: localize('category', "Filters installed extensions by provided category, when using --list-extension.") },
@@ -185,7 +187,7 @@
export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
delete parsedArgs[o.deprecates];
}
- if (val) {
+ if (typeof val !== 'undefined') {
if (o.type === 'string[]') {
if (val && !Array.isArray(val)) {
val = [val];
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
index f7d207009d..5c37b52dab 100644
--- a/src/vs/platform/environment/node/environmentService.ts
...
...
src/node/cli.ts
浏览文件 @
58f7f5b7
...
...
@@ -101,8 +101,11 @@ const startVscode = async (): Promise<void | void[]> => {
options
.
password
=
await
generatePassword
();
}
// This is necessary since VS Code filters out empty strings.
if
(
typeof
options
.
cert
===
"
undefined
"
&&
process
.
argv
.
indexOf
(
"
--cert
"
)
!==
-
1
)
{
if
(
!
options
.
certKey
&&
typeof
options
.
certKey
!==
"
undefined
"
)
{
throw
new
Error
(
`--cert-key cannot be blank`
);
}
else
if
(
options
.
certKey
&&
!
options
.
cert
)
{
throw
new
Error
(
`--cert-key was provided but --cert was not`
);
}
if
(
!
options
.
cert
&&
typeof
options
.
cert
!==
"
undefined
"
)
{
const
{
cert
,
certKey
}
=
await
generateCertificate
();
options
.
cert
=
cert
;
options
.
certKey
=
certKey
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录