Skip to content

Commit

Permalink
兼容theia #253
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Apr 14, 2023
1 parent e40e864 commit 237e559
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions extension/js/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ const trackerFactory = require("./trackerFactory");
const pickProcess = require("./pickProcess");

function getExtensionDirectory(context) {
const extensionPath = context.extensionPath
if (path.basename(extensionPath) != 'extension') {
return extensionPath
const envExtensionPath = process.env.VSCODE_EXTENSION_PATH;
if (envExtensionPath === undefined) {
return context.extensionPath
}
if (os.platform() == "win32") {
if (os.arch() == "x64") {
return process.env.VSCODE_EXTENSION_PATH + "-win32-x64"
return envExtensionPath + "-win32-x64"
}
return process.env.VSCODE_EXTENSION_PATH + "-win32-ia32"
return envExtensionPath + "-win32-ia32"
}
else if (os.platform() == "darwin") {
if (os.arch() == "arm64") {
return process.env.VSCODE_EXTENSION_PATH + "-darwin-arm64"
return envExtensionPath + "-darwin-arm64"
}
return process.env.VSCODE_EXTENSION_PATH + "-darwin-x64"
return envExtensionPath + "-darwin-x64"
}
else if (os.platform() == "linux") {
if (os.arch() == "arm64") {
return process.env.VSCODE_EXTENSION_PATH + "-linux-arm64"
return envExtensionPath + "-linux-arm64"
}
return process.env.VSCODE_EXTENSION_PATH + "-linux-x64"
return envExtensionPath + "-linux-x64"
}
}

Expand Down

1 comment on commit 237e559

@SEXTEDDY
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好 感谢你上次的解答,请问能不能给个链接请你喝杯咖啡。
另一个我根据你的提交修改了 extension.js后,theia可以创建连接了,但是一闪而过。报错信息如下:
image
这个是不是你之前说的他不可能完全和vscode兼容的问题?

Please sign in to comment.