You are here

protected function MarkdownCommands::exec in Markdown 8.2

Helper function for running a command on the system.

Parameters

string $command: The command to run.

int $exitStatus: (Read-Only) The exit status, passed by reference.

Return value

string The raw output from the command.

1 call to MarkdownCommands::exec()
MarkdownCommands::versionHash in src/Commands/MarkdownCommands.php
Run the markdown:version-hash hook.

File

src/Commands/MarkdownCommands.php, line 153

Class

MarkdownCommands
Markdown commands for Drush 9+.

Namespace

Drupal\markdown\Commands

Code

protected function exec($command, &$exitStatus = NULL) {
  $cwd = getcwd();
  \exec("cd \"{$cwd}\" && {$command}", $output, $exitStatus);
  return implode("\n", $output);
}