Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/command_clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ module.exports = function (task, exec, done) {
repository: false,
directory: false
});

// repo directory exists
if(grunt.file.exists(options.directory ? options.directory : task.target)){
grunt.log.ok(task.target+' exists!');
return done(); // call next
}
var args = ['clone'];

// repo is the sole required option
Expand All @@ -34,6 +38,8 @@ module.exports = function (task, exec, done) {
// final argument is checkout directory (optional)
if (options.directory) {
args.push(options.directory);
}else{// use task target name
args.push(task.target);
}

// Add callback
Expand Down