update patch 1
This commit is contained in:
+5
-7
@@ -20,8 +20,6 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*/
|
||||
class GithubActionReporter
|
||||
{
|
||||
private OutputInterface $output;
|
||||
|
||||
/**
|
||||
* @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85
|
||||
*/
|
||||
@@ -42,9 +40,9 @@ class GithubActionReporter
|
||||
',' => '%2C',
|
||||
];
|
||||
|
||||
public function __construct(OutputInterface $output)
|
||||
{
|
||||
$this->output = $output;
|
||||
public function __construct(
|
||||
private OutputInterface $output,
|
||||
) {
|
||||
}
|
||||
|
||||
public static function isGithubActionEnvironment(): bool
|
||||
@@ -89,11 +87,11 @@ class GithubActionReporter
|
||||
|
||||
if (!$file) {
|
||||
// No file provided, output the message solely:
|
||||
$this->output->writeln(sprintf('::%s::%s', $type, $message));
|
||||
$this->output->writeln(\sprintf('::%s::%s', $type, $message));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->output->writeln(sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
|
||||
$this->output->writeln(\sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user