Skip to content

Commit 5d74ca9

Browse files
author
Joe
committed
Revert "Add linkup command to improve link functionality"
This reverts commit 2504f6f.
1 parent 13404df commit 5d74ca9

File tree

6 files changed

+1
-50
lines changed

6 files changed

+1
-50
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ vendor/modules
1212
node-*
1313
/plugins
1414
/lib/coder-cloud-agent
15-
/lib/linkup
1615
.home
1716
coverage
1817
**/.DS_Store

ci/build/build-code-server.sh

-9
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ main() {
3030
chmod +x ./lib/coder-cloud-agent
3131
set -e
3232
fi
33-
34-
if ! [ -f ./lib/linkup ]; then
35-
echo "Downloading Link agent..."
36-
37-
set +e
38-
curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup
39-
chmod +x ./lib/linkup
40-
set -e
41-
fi
4233
}
4334

4435
main "$@"

ci/build/build-release.sh

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ EOF
6161
rsync node_modules/ "$RELEASE_PATH/node_modules"
6262
mkdir -p "$RELEASE_PATH/lib"
6363
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
64-
rsync ./lib/linkup "$RELEASE_PATH/lib"
6564
fi
6665
}
6766

ci/build/npm-postinstall.sh

-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ main() {
6666
echo "Failed to download cloud agent; --link will not work"
6767
fi
6868

69-
if curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup; then
70-
chmod +x ./lib/linkup
71-
else
72-
echo "Failed to download Link agent; the Link extension will not work"
73-
fi
74-
7569
if ! vscode_yarn; then
7670
echo "You may not have the required dependencies to build the native modules."
7771
echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"

src/node/link.ts

-16
This file was deleted.

src/node/main.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { field, logger } from "@coder/logger"
2-
import { ChildProcessWithoutNullStreams } from "child_process"
32
import http from "http"
43
import path from "path"
54
import { Disposable } from "../common/emitter"
6-
import { plural, logError } from "../common/util"
5+
import { plural } from "../common/util"
76
import { createApp, ensureAddress } from "./app"
87
import { AuthType, DefaultedArgs, Feature } from "./cli"
98
import { coderCloudBind } from "./coder_cloud"
109
import { commit, version, vsRootPath } from "./constants"
11-
import { startLink } from "./link"
1210
import { register } from "./routes"
1311
import { humanPath, isFile, loadAMDModule, open } from "./util"
1412

@@ -156,19 +154,6 @@ export const runCodeServer = async (
156154
logger.info(" - Connected to cloud agent")
157155
}
158156

159-
let linkAgent: undefined | ChildProcessWithoutNullStreams
160-
try {
161-
linkAgent = startLink(serverAddress)
162-
linkAgent.on("error", (error) => {
163-
logError(logger, "link daemon", error)
164-
})
165-
linkAgent.on("close", (code) => {
166-
logger.debug("link daemon closed", field("code", code))
167-
})
168-
} catch (error) {
169-
logError(logger, "link daemon", error)
170-
}
171-
172157
if (args.enable && args.enable.length > 0) {
173158
logger.info("Enabling the following experimental features:")
174159
args.enable.forEach((feature) => {
@@ -196,7 +181,6 @@ export const runCodeServer = async (
196181
return {
197182
server: app.server,
198183
dispose: async () => {
199-
linkAgent?.kill()
200184
disposeRoutes()
201185
await app.dispose()
202186
},

0 commit comments

Comments
 (0)