Skip to content

Commit 2742340

Browse files
committedJan 14, 2023
fix: help var binWithCmd not with bin name
1 parent 57f7fbb commit 2742340

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎src/Handler/AbstractHandler.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ protected function annotationVars(): array
209209
$binName = $this->input->getScriptName();
210210
$command = $this->input->getCommand();
211211
$fullCmd = $this->input->buildFullCmd($command);
212+
$cmdPath = $binName . ' ' . $command;
212213

213214
// e.g: `more info see {name}:index`
214215
return [
@@ -222,7 +223,8 @@ protected function annotationVars(): array
222223
'command' => $command, // demo OR home:test
223224
'fullCmd' => $fullCmd, // bin/app demo OR bin/app home:test
224225
'fullCommand' => $fullCmd,
225-
'binWithCmd' => $binName . ' ' . $command,
226+
'cmdPath' => $cmdPath,
227+
'binWithCmd' => $cmdPath,
226228
];
227229
}
228230

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

241243
$this->addPathNode($this->commandName);
242-
$this->commentsVars['binWithCmd'] = $this->getPath();
244+
245+
$binName = $this->input->getScriptName();
246+
$cmdPath = $binName . ' ' . $this->getPath();
247+
248+
$this->commentsVars['cmdPath'] = $this->commentsVars['binWithCmd'] = $cmdPath;
243249
}
244250

245251
/**

0 commit comments

Comments
 (0)
Please sign in to comment.