balena-cli/lib/git.coffee

9 lines
297 B
CoffeeScript
Raw Normal View History

2015-03-09 13:14:39 +00:00
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)