fix: bot deployments

This commit is contained in:
Andras Bacsai
2022-08-16 16:03:09 +02:00
parent 9b51936131
commit bac55cd90d
3 changed files with 11 additions and 9 deletions

View File

@@ -70,7 +70,10 @@ export const features = readable({
});
export const location: Writable<null | string> = writable(null)
export const setLocation = (resource: any) => {
export const setLocation = (resource: any, settings?: any) => {
if (resource.settings.isBot) {
return location.set(`http://${settings.ipv4}:${resource.exposePort}`)
}
if (GITPOD_WORKSPACE_URL && resource.exposePort) {
const { href } = new URL(GITPOD_WORKSPACE_URL);
const newURL = href