Skip to content

Commit

Permalink
Merge pull request #46 from codesphere-cloud/main
Browse files Browse the repository at this point in the history
changed logic
  • Loading branch information
Datata1 authored May 27, 2024
2 parents 9ad20c6 + ae5aec8 commit 2cea479
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
prepare:
steps:
- name: Clean up
command: rm -rf .codesphere-internal/code .codesphere-internal/nohup-out .codesphere-internal/vscode_cli.tar.gz ../.vscode-server ../.vscode
- name: Install Dependencies
command: cd server && npm install
- name: Change node version
Expand Down
18 changes: 16 additions & 2 deletions src/SidebarProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,22 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
let workspaceURL = stdout ? stdout.trim() : ``;

if (workspaceURL === '57609-3000.2.codesphere.com') {
request(uaSocket, "terminalStream", { method: "data", data: ""}, "workspace-proxy", 4);
request(uaSocket, "terminalStream", { method: "data", data: "./.codesphere-internal/code tunnel --install-extension " + vsixFile + "\r"}, "workspace-proxy", 4);
let removeVSC = "rm -rf .codesphere-internal/nohup-out .codesphere-internal/vscode_cli.tar.gz ../.vscode-server ../.vscode";
exec(removeVSC, (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}

if (stderr) {
console.error(`stderr: ${stderr}`);
return;
}

console.log(`stdout: ${stdout}`);
request(uaSocket, "terminalStream", { method: "data", data: ""}, "workspace-proxy", 4);
request(uaSocket, "terminalStream", { method: "data", data: "./.codesphere-internal/code tunnel --install-extension " + vsixFile + "\r"}, "workspace-proxy", 4);
});
} else {
request(uaSocket, "terminalStream", { method: "data", data: ""}, "workspace-proxy", 4);
request(uaSocket, "terminalStream", { method: "data", data: "./.codesphere-internal/code tunnel --install-extension Codesphere.codesphere" +"\r"}, "workspace-proxy", 4);
Expand Down

0 comments on commit 2cea479

Please sign in to comment.