mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-23 15:32:22 +00:00
19 lines
439 B
JavaScript
19 lines
439 B
JavaScript
(function() {
|
|
var child_process;
|
|
|
|
child_process = require('child_process');
|
|
|
|
exports.isGitDirectory = function(directory, callback) {
|
|
return exports.execute('status', directory, function(error, stdout, stderr) {
|
|
return callback(null, error == null);
|
|
});
|
|
};
|
|
|
|
exports.execute = function(command, cwd, callback) {
|
|
return child_process.exec("git " + command, {
|
|
cwd: cwd
|
|
}, callback);
|
|
};
|
|
|
|
}).call(this);
|