Skip to content

Commit

Permalink
Dev: Fix --live flag (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaeesBhatti authored Apr 17, 2020
1 parent 3b1796d commit 63db612
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,18 +495,18 @@ class DevCommand extends Command {
})
}

let { url, proxyPortUsed } = await startProxy(settings, addonUrls, site.configPath, site.root, functionsDir)
let { url } = await startProxy(settings, addonUrls, site.configPath, site.root, functionsDir)
if (!url) {
throw new Error('Unable to start proxy server')
}

if (flags.live) {
await waitPort({ proxyPortUsed })
await waitPort({ port: settings.proxyPort })
const liveSession = await createTunnel(site.id, accessToken, this.log)
url = liveSession.session_url
process.env.BASE_URL = url

await connectTunnel(liveSession, accessToken, proxyPortUsed, this.log)
await connectTunnel(liveSession, accessToken, settings.proxyPort, this.log)
}

await this.config.runHook('analytics', {
Expand Down

0 comments on commit 63db612

Please sign in to comment.