Skip to content

Commit

Permalink
fix: πŸ› do not check for staged files when using --amend
Browse files Browse the repository at this point in the history
βœ… Closes: streamich#189
  • Loading branch information
jimmy-guzman committed Jul 31, 2020
1 parent 0d992b3 commit 2d78d8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli.js
Expand Up @@ -29,11 +29,12 @@ const executeCommand = (command, args = [], env = process.env) => {
const main = async () => {
try {
const {cliAnswers, cliOptions, passThroughParams} = parseArgs();
const hasAmendParam = passThroughParams.amend || passThroughParams.a;

if (cliOptions.dryRun) {
// eslint-disable-next-line no-console
console.log('Running in dry mode.');
} else if (!passThroughParams['allow-empty']) {
} else if (!passThroughParams['allow-empty'] && !hasAmendParam) {
try {
/**
* @author https://github.com/rodrigograca31
Expand Down

0 comments on commit 2d78d8a

Please sign in to comment.