Skip to content

Commit

Permalink
Merge pull request #229 from hoogi91
Browse files Browse the repository at this point in the history
Fix commit issues on missing /dev/tty
  • Loading branch information
sebastianfeldmann authored Oct 16, 2023
2 parents cd09c24 + 8252cc3 commit 24bd228
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Hook/Template/Docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public function getCode(string $hook): string
$path2Config = $this->pathInfo->getConfigPath();
$config = $path2Config !== CH::CONFIG ? ' --configuration=' . escapeshellarg($path2Config) : '';
$bootstrap = !empty($this->config->getBootstrap()) ? ' --bootstrap=' . $this->config->getBootstrap() : '';
$tty = Hooks::allowsUserInput($hook) ? 'exec < /dev/tty' : '';
$tty = Hooks::allowsUserInput($hook)
? "if sh -c \": >/dev/tty\" >/dev/null 2>/dev/null; then\n\texec < /dev/tty\nfi"
: '';

$lines = [
'#!/bin/sh',
Expand Down

0 comments on commit 24bd228

Please sign in to comment.