mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 01:10:04 +02:00
Resolves #749 -- warning on reset solved command
This commit is contained in:
parent
2ac8fc23d3
commit
1017efe3cf
1 changed files with 9 additions and 0 deletions
|
@ -234,6 +234,15 @@ var Sandbox = Backbone.View.extend({
|
|||
},
|
||||
|
||||
resetSolved: function(command, deferred) {
|
||||
if (command.get('regexResults').input !== 'reset solved --confirm') {
|
||||
command.set('error', new Errors.GitError({
|
||||
msg: 'Reset solved will mark each level as not yet solved; because ' +
|
||||
'this is a destructive command, please pass in --confirm to execute',
|
||||
}));
|
||||
command.finishWith(deferred);
|
||||
return;
|
||||
}
|
||||
|
||||
LevelActions.resetLevelsSolved();
|
||||
command.addWarning(
|
||||
intl.str('solved-map-reset')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue