aboutsummaryrefslogtreecommitdiff
path: root/src/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net.c b/src/net.c
index bf03a07..f58e8fe 100644
--- a/src/net.c
+++ b/src/net.c
@@ -44,6 +44,8 @@ static inline int xferinfo(UNUSED void *p, curl_off_t dltotal, curl_off_t dlnow,
struct MemoryStruct* downloadToRam(const char* URL, int progress)
{
+ if (no_net) return NULL;
+
CURL* curl_handle;
CURLcode res = CURLE_OK;
@@ -138,6 +140,10 @@ struct json_object* fetchJSON(const char* URL)
free(chunk->memory);
free(chunk);
}
+ else if (isatty(STDERR_FILENO))
+ {
+ fprintf(stderr, "Couldn't fetch JSON\n");
+ }
return json;
}