summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/generate/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js
index 6a07a21..86cdf7c 100644
--- a/lib/generate/index.js
+++ b/lib/generate/index.js
@@ -170,6 +170,16 @@ var generateBook = function(options) {
// Get repo's URL
.then(function() {
+ // Git deactivated
+ if(options.github === false) {
+ options.github = null;
+ return null;
+ } else if(options.github) {
+ // Git already specified in options
+ return options.github;
+ }
+
+ // Try auto detecting
return parse.git.url(options.input)
.then(function(_url) {
// Get ID of repo
@@ -178,7 +188,7 @@ var generateBook = function(options) {
return null;
})
.then(function(repoId) {
- options.github = options.github || repoId;
+ options.github = repoId;
});
})