balena-cli/lib/git.coffee
2015-03-09 09:14:39 -04:00

9 lines
297 B
CoffeeScript

child_process = require('child_process')
exports.isGitDirectory = (directory, callback) ->
exports.execute 'status', directory, (error, stdout, stderr) ->
return callback(null, not error?)
exports.execute = (command, cwd, callback) ->
child_process.exec("git #{command}", { cwd }, callback)