mirror of https://github.com/IoTcat/FDC.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
397 B
14 lines
397 B
|
|
var Git = require('./git'); |
|
|
|
module.exports = function (baseDir) { |
|
|
|
var dependencies = require('./util/dependencies'); |
|
|
|
if (baseDir && !dependencies.exists(baseDir, dependencies.exists.FOLDER)) { |
|
throw new Error("Cannot use simple-git on a directory that does not exist."); |
|
} |
|
|
|
return new Git(baseDir || process.cwd(), dependencies.childProcess(), dependencies.buffer()); |
|
}; |
|
|
|
|