Skip to content

Commit a653b93

Browse files
committed
Include protocol on printed address
This makes it clickable from the terminal.
1 parent e2c35fa commit a653b93

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/node/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, http.Ser
4545
}
4646

4747
/**
48-
* Get the address of a server as a string (protocol not included) while
48+
* Get the address of a server as a string (protocol *is* included) while
4949
* ensuring there is one (will throw if there isn't).
5050
*/
5151
export const ensureAddress = (server: http.Server): string => {
@@ -54,7 +54,7 @@ export const ensureAddress = (server: http.Server): string => {
5454
throw new Error("server has no address")
5555
}
5656
if (typeof addr !== "string") {
57-
return `${addr.address}:${addr.port}`
57+
return `http://${addr.address}:${addr.port}`
5858
}
5959
return addr
6060
}

src/node/entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const main = async (args: DefaultedArgs): Promise<void> => {
141141

142142
if (args.link) {
143143
try {
144-
await coderCloudBind(serverAddress, args.link.value)
144+
await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value)
145145
logger.info(" - Connected to cloud agent")
146146
} catch (err) {
147147
logger.error(err.message)

0 commit comments

Comments
 (0)