Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Fix #117
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardolundgren committed Sep 10, 2013
1 parent fc49b29 commit 61f2d96
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions lib/cmds/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var async = require('async'),
git = require('../git'),
logger = require('../logger'),
open = require('open'),
prompt = require('prompt'),
url = require('url');

// -- Constructor --------------------------------------------------------------
Expand Down Expand Up @@ -113,12 +114,25 @@ Repo.prototype.run = function() {
}

if (options.delete) {
logger.logTemplate('{{prefix}} [info] Deleting the repo on {{greenBright options.user "/" options.delete}}', {
logger.logTemplate('{{prefix}} [info] Deleting repo {{greenBright options.user "/" options.delete}}', {
options: options
});

instance.delete(function(err1) {
logger.defaultCallback(err1, null);
prompt.get({
properties: {
confirmation: {
description: 'Are you sure? This action CANNOT be undone. [y/N]'
}
}
}, function (err, result) {
if (result.confirmation.toLowerCase() === 'y') {
instance.delete(function(err1) {
logger.defaultCallback(err1, null);
});
}
else {
logger.info('Not deleted.');
}
});
}

Expand Down

0 comments on commit 61f2d96

Please sign in to comment.