repos / neovimcraft

website that makes it easy to find neovim plugins
git clone https://github.com/neurosnap/neovimcraft.git

commit
126a9cd
parent
91acb5d
author
Eric Bower
date
2021-07-27 03:04:27 +0000 UTC
check for lowercase readme
1 files changed,  +9, -0
M src/process.ts
+9, -0
 1@@ -32,6 +32,14 @@ async function fetchReadme({
 2     return { ok: true, data };
 3   }
 4 
 5+  const lowerUrl = `https://raw.githubusercontent.com/${username}/${repo}/${branch}/readme.md`;
 6+  const lowerRes = await fetch(lowerUrl);
 7+  if (lowerRes.ok) {
 8+    const data = await lowerRes.text();
 9+    return { ok: true, data };
10+  }
11+
12+  console.log(`FAILURE: could not load ${url}`);
13   return {
14     ok: false,
15     data: {
16@@ -56,6 +64,7 @@ async function fetchRepo({ username, repo }: Props): Promise<Resp<{ [key: string
17     };
18   }
19 
20+  console.log(`FAILURE: could not load ${url}`);
21   return {
22     ok: false,
23     data: {