Archived
1
0

Unambiguify address replacement

Co-authored-by: Teffen Ellis <TeffenEllis@users.noreply.github.com>
This commit is contained in:
Asher 2020-10-27 17:38:54 -05:00 committed by GitHub
parent cde94d5ed4
commit dc177ab505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,7 +161,7 @@ const main = async (args: DefaultedArgs): Promise<void> => {
if (!args.socket && args.open) {
// The web socket doesn't seem to work if browsing with 0.0.0.0.
const openAddress = serverAddress.replace(/:\/\/0.0.0.0/, "://localhost")
const openAddress = serverAddress.replace("://0.0.0.0", "://localhost")
await open(openAddress).catch((error: Error) => {
logger.error("Failed to open", field("address", openAddress), field("error", error))
})