Skip to content
Permalink
Browse files

fix($core): cannot fetch data from private repo (close: #2)

This is a regression bug of 93e0c06
  • Loading branch information...
ulivz committed Feb 11, 2019
1 parent 1110274 commit a59c420e78cf5e982a1a67b842ca7331e7484ffd
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/index.js
@@ -54,13 +54,14 @@ module.exports = (opts, ctx) => {
throw new Error(`Expected repoId or repoUrl`)
}

Yuque.setAuthToken(authToken)

if (repoUrl) {
const targetRepo = await Yuque.inferRepoByUrl(repoUrl)
repoId = targetRepo.id
}

Yuque.setRepoId(repoId)
Yuque.setAuthToken(authToken)
const yuque = Yuque.getInstance()

spinner.start(`Fetching repo detail ...`)

0 comments on commit a59c420

Please sign in to comment.
You can’t perform that action at this time.