Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Coder
code-server
提交
ce8577b1
C
code-server
项目概览
镜像
/
Coder
/
code-server
2022-09-21 03:15:05同步失败
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ce8577b1
编写于
8月 27, 2020
作者:
A
Asher
提交者:
GitHub
8月 27, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove open-in flag (#2013)
上级
d8d5908d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
12 deletion
+9
-12
package.json
package.json
+1
-1
src/node/cli.ts
src/node/cli.ts
+1
-3
src/node/entry.ts
src/node/entry.ts
+7
-8
未找到文件。
package.json
浏览文件 @
ce8577b1
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
"lint"
:
"./ci/dev/lint.sh"
,
"lint"
:
"./ci/dev/lint.sh"
,
"test"
:
"./ci/dev/test.sh"
,
"test"
:
"./ci/dev/test.sh"
,
"ci"
:
"./ci/dev/ci.sh"
,
"ci"
:
"./ci/dev/ci.sh"
,
"watch"
:
"NODE_OPTIONS=--max_old_space_size=32384 ts-node ./ci/dev/watch.ts"
"watch"
:
"
VSCODE_IPC_HOOK_CLI=
NODE_OPTIONS=--max_old_space_size=32384 ts-node ./ci/dev/watch.ts"
},
},
"main"
:
"out/node/entry.js"
,
"main"
:
"out/node/entry.js"
,
"devDependencies"
:
{
"devDependencies"
:
{
...
...
src/node/cli.ts
浏览文件 @
ce8577b1
...
@@ -45,7 +45,6 @@ export interface Args extends VsArgs {
...
@@ -45,7 +45,6 @@ export interface Args extends VsArgs {
readonly
"
proxy-domain
"
?:
string
[]
readonly
"
proxy-domain
"
?:
string
[]
readonly
locale
?:
string
readonly
locale
?:
string
readonly
_
:
string
[]
readonly
_
:
string
[]
readonly
"
open-in
"
?:
boolean
readonly
"
reuse-window
"
?:
boolean
readonly
"
reuse-window
"
?:
boolean
readonly
"
new-window
"
?:
boolean
readonly
"
new-window
"
?:
boolean
}
}
...
@@ -142,7 +141,6 @@ const options: Options<Required<Args>> = {
...
@@ -142,7 +141,6 @@ const options: Options<Required<Args>> = {
"
show-versions
"
:
{
type
:
"
boolean
"
,
description
:
"
Show VS Code extension versions.
"
},
"
show-versions
"
:
{
type
:
"
boolean
"
,
description
:
"
Show VS Code extension versions.
"
},
"
proxy-domain
"
:
{
type
:
"
string[]
"
,
description
:
"
Domain used for proxying ports.
"
},
"
proxy-domain
"
:
{
type
:
"
string[]
"
,
description
:
"
Domain used for proxying ports.
"
},
"
open-in
"
:
{
type
:
"
boolean
"
,
short
:
"
oi
"
,
description
:
"
Open file(s) or folder(s) in running instance
"
},
"
new-window
"
:
{
"
new-window
"
:
{
type
:
"
boolean
"
,
type
:
"
boolean
"
,
short
:
"
n
"
,
short
:
"
n
"
,
...
@@ -372,7 +370,7 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
...
@@ -372,7 +370,7 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
logger
.
info
(
`Wrote default config file to
${
humanPath
(
configPath
)}
`
)
logger
.
info
(
`Wrote default config file to
${
humanPath
(
configPath
)}
`
)
}
}
if
(
!
process
.
env
.
CODE_SERVER_PARENT_PID
)
{
if
(
!
process
.
env
.
CODE_SERVER_PARENT_PID
&&
!
process
.
env
.
VSCODE_IPC_HOOK_CLI
)
{
logger
.
info
(
`Using config file
${
humanPath
(
configPath
)}
`
)
logger
.
info
(
`Using config file
${
humanPath
(
configPath
)}
`
)
}
}
...
...
src/node/entry.ts
浏览文件 @
ce8577b1
...
@@ -164,14 +164,13 @@ async function entry(): Promise<void> {
...
@@ -164,14 +164,13 @@ async function entry(): Promise<void> {
console
.
log
(
version
,
commit
)
console
.
log
(
version
,
commit
)
}
}
process
.
exit
(
0
)
process
.
exit
(
0
)
}
else
if
(
args
[
"
open-in
"
])
{
}
else
if
(
process
.
env
.
VSCODE_IPC_HOOK_CLI
)
{
if
(
!
process
.
env
[
"
VSCODE_IPC_HOOK_CLI
"
])
{
const
pipeArgs
:
OpenCommandPipeArgs
=
{
logger
.
error
(
"
VSCODE_IPC_HOOK_CLI missing from environment, unable to run
"
)
type
:
"
open
"
,
process
.
exit
(
1
)
folderURIs
:
[],
forceReuseWindow
:
args
[
"
reuse-window
"
],
forceNewWindow
:
args
[
"
new-window
"
],
}
}
const
pipeArgs
:
OpenCommandPipeArgs
=
{
type
:
"
open
"
,
folderURIs
:
[]
}
pipeArgs
.
forceReuseWindow
=
args
[
"
reuse-window
"
]
pipeArgs
.
forceNewWindow
=
args
[
"
new-window
"
]
const
isDir
=
async
(
path
:
string
):
Promise
<
boolean
>
=>
{
const
isDir
=
async
(
path
:
string
):
Promise
<
boolean
>
=>
{
try
{
try
{
const
st
=
await
fs
.
stat
(
path
)
const
st
=
await
fs
.
stat
(
path
)
...
@@ -196,7 +195,7 @@ async function entry(): Promise<void> {
...
@@ -196,7 +195,7 @@ async function entry(): Promise<void> {
process
.
exit
(
1
)
process
.
exit
(
1
)
}
}
if
(
pipeArgs
.
folderURIs
.
length
===
0
&&
(
!
pipeArgs
.
fileURIs
||
pipeArgs
.
fileURIs
.
length
===
0
))
{
if
(
pipeArgs
.
folderURIs
.
length
===
0
&&
(
!
pipeArgs
.
fileURIs
||
pipeArgs
.
fileURIs
.
length
===
0
))
{
logger
.
error
(
"
open-in expects
at least one file or folder argument
"
)
logger
.
error
(
"
Please specify
at least one file or folder argument
"
)
process
.
exit
(
1
)
process
.
exit
(
1
)
}
}
const
vscode
=
http
.
request
(
const
vscode
=
http
.
request
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录