@reactful/create 0.0.73 → 0.0.75
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -61,13 +61,14 @@ const downloadRepo = async (subfolder, destination) =>
|
|
61
61
|
|
62
62
|
async function downloadGitHub(user, repository, subdir, destination) {
|
63
63
|
const prefix = `https://api.github.com/repos/${user}/${repository}`
|
64
|
-
const response = await fetch(
|
64
|
+
const response = await fetch(`${prefix}/contents/installation/${subdir}`)
|
65
65
|
const contents = response.json()
|
66
66
|
|
67
|
-
if (Array.isArray(contents)) {
|
67
|
+
if (!Array.isArray(contents) || !response.ok) {
|
68
68
|
console.error('failed to download scafold from github...')
|
69
|
+
console.log('response: ', response.statusText)
|
69
70
|
console.log('type: ', typeof contents)
|
70
|
-
console.log('url: ', url)
|
71
|
+
console.log('url: ', response.url)
|
71
72
|
}
|
72
73
|
|
73
74
|
for (const item of contents) {
|