Skip to content

Commit e5083cc

Browse files
committed
cleaning up the suggestion
1 parent d50a08e commit e5083cc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/PatternLab/InstallerUtil.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,20 +439,22 @@ public static function postCreateProjectCmd($event) {
439439
foreach ($suggestions as $i => $suggestion) {
440440

441441
// write each suggestion
442-
Console::writeLine($i.": ".$suggestion, true);
442+
$num = $i + 1;
443+
Console::writeLine($num.": ".$suggestion, true);
443444

444445
}
445446

446447
// prompt for input on the suggestions
447448
$prompt = "choose an option or hit return to skip:";
448449
$options = "(ex. 1)";
449450
$input = Console::promptInput($prompt,$options);
451+
$result = (int)$input - 1;
450452

451-
if (isset($suggestions[$input])) {
453+
if (isset($suggestions[$result])) {
452454

453455
Console::writeLine("");
454456
$f = new Fetch();
455-
$result = $f->fetchStarterKit($suggestions[$input]);
457+
$result = $f->fetchStarterKit($suggestions[$result]);
456458

457459
if ($result) {
458460

0 commit comments

Comments
 (0)