Skip to content

Commit 0022fa1

Browse files
committed
Switch to port
1 parent a852378 commit 0022fa1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ export function activate(context: vscode.ExtensionContext) {
5252
port = address.port;
5353
console.log("Listening on port " + address.port);
5454
if (vscode.window.state.focused) {
55-
writeHost();
55+
writePort();
5656
}
5757
});
5858

5959
vscode.window.onDidChangeWindowState((event) => {
6060
if (event.focused && port !== null) {
61-
writeHost();
61+
writePort();
6262
}
6363
});
6464

65-
function writeHost() {
66-
writeFileSync("/tmp/vscode-host", `localhost:${port}`);
65+
function writePort() {
66+
writeFileSync("/tmp/vscode-port", `${port}`);
6767
}
6868
}
6969

0 commit comments

Comments
 (0)