Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

add warning if site is not linked when running netlify deploy live tunnel #87

Merged
merged 1 commit into from
Apr 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/live-tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ const { fetchLatest, updateAvailable } = require("gh-release-fetch");
async function createTunnel(siteId, netlifyApiToken, log) {
await installTunnelClient(log);

log("Creating Live Tunnel");
if (!siteId) {
console.error(
"Error: no siteId defined, did you forget to run `netlify init` or `netlify link`?"
);
process.exit(1);
}
log("Creating Live Tunnel for " + siteId);
const url = `https://api.netlify.com/api/v1/live_sessions?site_id=${siteId}`;

const response = await fetch(url, {
Expand Down