2015-03-17 21:13:37 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var Steppy = require('twostep').Steppy,
|
|
|
|
inherits = require('util').inherits,
|
|
|
|
ParentExecutor = require('./base').Executor,
|
|
|
|
createScm = require('../scm').createScm,
|
|
|
|
createCommand = require('../command').createCommand,
|
2016-02-26 20:58:46 +00:00
|
|
|
fs = require('fs'),
|
2016-02-28 19:13:24 +00:00
|
|
|
SpawnCommand = require('../command/spawn').Command;
|
2015-03-17 21:13:37 +00:00
|
|
|
|
|
|
|
function Executor(params) {
|
|
|
|
ParentExecutor.call(this, params);
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(Executor, ParentExecutor);
|
|
|
|
|
|
|
|
exports.Executor = Executor;
|
|
|
|
|
2015-06-28 07:47:06 +00:00
|
|
|
Executor.prototype._createScm = function(params) {
|
2016-02-28 19:13:24 +00:00
|
|
|
params.command = new SpawnCommand();
|
|
|
|
|
2015-06-28 07:47:06 +00:00
|
|
|
return createScm(params);
|
|
|
|
};
|
|
|
|
|
2016-02-26 20:43:38 +00:00
|
|
|
Executor.prototype._createCommand = function(params) {
|
|
|
|
return createCommand(params);
|
2015-03-17 21:13:37 +00:00
|
|
|
};
|
2016-02-26 20:58:46 +00:00
|
|
|
|
|
|
|
Executor.prototype._isCloned = function(callback) {
|
|
|
|
fs.exists(this.cwd, function(exists) {
|
|
|
|
callback(null, exists);
|
|
|
|
});
|
|
|
|
};
|