From e12a226b4fa380b9c2f0dff50649886e09b70ac8 Mon Sep 17 00:00:00 2001 From: tracer Date: Fri, 16 Sep 2022 15:03:19 +0200 Subject: [PATCH] modified shebang behaviour --- bin/console | 57 +++++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) mode change 100755 => 100644 bin/console diff --git a/bin/console b/bin/console old mode 100755 new mode 100644 index 5830058..20f295b --- a/bin/console +++ b/bin/console @@ -1,5 +1,6 @@ -#!/usr/bin/keyhelp-php81 +#!/usr/bin/env php runCommand(); -} catch (DependencyException|NotFoundException $e) { - echo $e->getMessage(); + $app = new BindAPI(verbose: $verbose ); + $app->runCommand(argumentsCount: count(value: $arguments), arguments: $arguments); + +} catch (DependencyException|NotFoundException|Exception $e) { + echo $e->getMessage() . PHP_EOL; exit(1); -} catch (Exception $e) { - echo $e->getMessage(); } @@ -89,7 +72,7 @@ try { * * @return bool */ -function confirm(String $message = 'Are you sure? ', array $options = ['y', 'n'], string $default ='n'): bool +function confirm(string $message = 'Are you sure? ', array $options = ['y', 'n'], string $default = 'n'): bool { // first $options means true, any other false echo $message, ' (';