diff --git a/.vortex/docs/.utils/update-videos.php b/.vortex/docs/.utils/update-videos.php index d5c375c51..87d50b145 100755 --- a/.vortex/docs/.utils/update-videos.php +++ b/.vortex/docs/.utils/update-videos.php @@ -486,4 +486,13 @@ function main(array $argv): int { return 0; } -exit(main($argv)); +// A failure inside main() reports itself before it is thrown, so the message +// alone is the whole error. +try { + exit(main($argv)); +} +catch (Throwable $exception) { + fwrite(STDERR, $exception->getMessage() . "\n"); + + exit(1); +} diff --git a/.vortex/installer/src/Utils/FileManager.php b/.vortex/installer/src/Utils/FileManager.php index 38d4b3169..ee28684bc 100644 --- a/.vortex/installer/src/Utils/FileManager.php +++ b/.vortex/installer/src/Utils/FileManager.php @@ -130,7 +130,9 @@ public function prepareDestination(): array { // The destination arrives from a CLI option, the environment or a config // file, so it is escaped rather than interpolated into the shell string. - $command = sprintf('git --work-tree=%s --git-dir=%s init > /dev/null', escapeshellarg($destination), escapeshellarg($destination . '/.git')); + // 'git init' writes the initial branch advice to stderr when + // 'init.defaultBranch' is unset, and passthru() draws it inside the TUI. + $command = sprintf('git -c advice.defaultBranchName=false --work-tree=%s --git-dir=%s init > /dev/null', escapeshellarg($destination), escapeshellarg($destination . '/.git')); passthru($command, $exit_code); if ($exit_code !== 0 || !File::exists($destination . '/.git')) {