Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GithubActionError.php

function GithubActionError::emit

File

vendor/composer/composer/src/Composer/Console/GithubActionError.php, line 30

Class

GithubActionError

Namespace

Composer\Console

Code

public function emit(string $message, ?string $file = null, ?int $line = null) : void {
    if (Platform::getEnv('GITHUB_ACTIONS') && !Platform::getEnv('COMPOSER_TESTS_ARE_RUNNING')) {
        $message = $this->escapeData($message);
        if ($file && $line) {
            $file = $this->escapeProperty($file);
            $this->io
                ->write("::error file=" . $file . ",line=" . $line . "::" . $message);
        }
        elseif ($file) {
            $file = $this->escapeProperty($file);
            $this->io
                ->write("::error file=" . $file . "::" . $message);
        }
        else {
            $this->io
                ->write("::error ::" . $message);
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal