Showing the changes to node_modules/simple-git/src/index.js (1 of 41 files). Show all
Unified · Split
| @@ -0,0 +1,14 @@ | ||
| 1 | + | |
| 2 | +var Git = require('./git'); | |
| 3 | + | |
| 4 | +module.exports = function (baseDir) { | |
| 5 | + | |
| 6 | + var dependencies = require('./util/dependencies'); | |
| 7 | + | |
| 8 | + if (baseDir && !dependencies.exists(baseDir, dependencies.exists.FOLDER)) { | |
| 9 | + throw new Error("Cannot use simple-git on a directory that does not exist."); | |
| 10 | + } | |
| 11 | + | |
| 12 | + return new Git(baseDir || process.cwd(), dependencies.childProcess(), dependencies.buffer()); | |
| 13 | +}; | |
| 14 | + | |