Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gitStatusPorcelain.stdout.on('data', function(data) {
var files = this.getNoStagedFiles(data);
if (files.length === 0) {
utils.showError('No files to add');
return;
}
files.unshift(addAll);
this.promptFileSelection(files);
}.bind(this));
};
function executeGitPreLogCallback(err, gitTitles) {
var gitLogUserCommand;
if (err) { utils.showError(err); return; }
gitLogTitles = gitTitles;
gitLogUserCommand = configParser.getLogCommand();
childProcess.exec(gitLogUserCommand, executeGitLogCallback);
}
return onAskFor(field, desc).then(function (title) {
if (!title) {
utils.showError('Title is mandatory');
return onTitlePrompt(field, desc);
}
return Promise.resolve(' ' + title);
});
}
childProcess.exec('git commit -m "' + commitMessage + '"', function (error) {
if (error) {
utils.showError('Nothing to commit, you need to do a `git add` before commit');
}
});
}