Skip to content

Commit

Permalink
fix: help var binWithCmd not with bin name
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 14, 2023
1 parent 57f7fbb commit 2742340
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Handler/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ protected function annotationVars(): array
$binName = $this->input->getScriptName();
$command = $this->input->getCommand();
$fullCmd = $this->input->buildFullCmd($command);
$cmdPath = $binName . ' ' . $command;

// e.g: `more info see {name}:index`
return [
Expand All @@ -222,7 +223,8 @@ protected function annotationVars(): array
'command' => $command, // demo OR home:test
'fullCmd' => $fullCmd, // bin/app demo OR bin/app home:test
'fullCommand' => $fullCmd,
'binWithCmd' => $binName . ' ' . $command,
'cmdPath' => $cmdPath,
'binWithCmd' => $cmdPath,
];
}

Expand All @@ -239,7 +241,11 @@ protected function initForRun(): void
}

$this->addPathNode($this->commandName);
$this->commentsVars['binWithCmd'] = $this->getPath();

$binName = $this->input->getScriptName();
$cmdPath = $binName . ' ' . $this->getPath();

$this->commentsVars['cmdPath'] = $this->commentsVars['binWithCmd'] = $cmdPath;
}

/**
Expand Down

0 comments on commit 2742340

Please sign in to comment.