Skip to content

Commit 22f232c

Browse files
authored
Prevent unknown option with git commands (#260)
1 parent b4431dd commit 22f232c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/NewCommand.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,10 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
552552
return $value;
553553
}
554554

555+
if (substr($value, 0, 3) === 'git') {
556+
return $value;
557+
}
558+
555559
return $value.' --no-ansi';
556560
}, $commands);
557561
}
@@ -562,6 +566,10 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
562566
return $value;
563567
}
564568

569+
if (substr($value, 0, 3) === 'git') {
570+
return $value;
571+
}
572+
565573
return $value.' --quiet';
566574
}, $commands);
567575
}

0 commit comments

Comments
 (0)