From 7039658ce83e60eaadea26ac012789336961773c Mon Sep 17 00:00:00 2001 From: jspspike Date: Mon, 13 Jul 2020 16:18:14 -0500 Subject: [PATCH] Added warning for site in unauthenticated preview --- src/preview/upload.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/preview/upload.rs b/src/preview/upload.rs index 79e62f33e..7252268c2 100644 --- a/src/preview/upload.rs +++ b/src/preview/upload.rs @@ -180,7 +180,7 @@ fn unauthenticated_upload(target: &Target) -> Result { log::info!("address: {}", create_address); let mut target = target.clone(); - // KV namespaces are not supported by the preview service unless you authenticate + // KV namespaces and sites are not supported by the preview service unless you authenticate // so we omit them and provide the user with a little guidance. We don't error out, though, // because there are valid workarounds for this for testing purposes. if !target.kv_namespaces.is_empty() { @@ -189,6 +189,13 @@ fn unauthenticated_upload(target: &Target) -> Result { ); target.kv_namespaces = Vec::new(); } + if target.site.is_some() { + message::warn( + "Sites are not supported in preview without setting API credentials and account_id", + ); + target.site = None; + } + let script_upload_form = upload::form::build(&target, None)?; let client = http::client(); let res = client