From 7cc41a74d021f0523b969555b52f9515afd1c2e6 Mon Sep 17 00:00:00 2001 From: Pete Bishop Date: Wed, 5 Feb 2025 13:22:20 +0000 Subject: [PATCH 1/4] Update logic to ensure TTY mode is appropriately disabled Fixes https://github.com/NativePHP/laravel/issues/468 - Utilises the Symfony Process class which has a tried and tested `isTtySupported()` method. This will return false if windows due to a DIRECTORY_SEPARATOR check. - Removed check for Windows specifically as this is checked as above. - Ensures even if TTY is supported, it is still set to off when -n|--non-interactive is specified. --- src/Commands/BuildCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 98b9b722..5a544643 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -9,6 +9,7 @@ use Native\Electron\Facades\Updater; use Native\Electron\Traits\InstallsAppIcon; use Native\Electron\Traits\OsAndArch; +use Symfony\Component\Process\Process as SymfonyProcess; class BuildCommand extends Command { @@ -60,7 +61,7 @@ public function handle(): void Process::path(__DIR__.'/../../resources/js/') ->env($this->getEnvironmentVariables()) ->forever() - ->tty(PHP_OS_FAMILY != 'Windows' && ! $this->option('no-interaction')) + ->tty(SymfonyProcess::isTtySupported() && ! $this->option('no-interaction')) ->run("npm run {$buildCommand}:{$os}", function (string $type, string $output) { echo $output; }); From b6c5a2f1eca2790b0fc8914a0ed2ac99497340cf Mon Sep 17 00:00:00 2001 From: Pete Bishop Date: Wed, 5 Feb 2025 13:28:06 +0000 Subject: [PATCH 2/4] Ensure beta is allowed to be requested --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6f404297..49939c41 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "php": "^8.1", "illuminate/contracts": "^10.0|^11.0", "laravel/prompts": "^0.1.1|^0.2|^0.3", - "nativephp/laravel": "^1.0", + "nativephp/laravel": "^1.0@beta", "nativephp/php-bin": "^0.5.1", "spatie/laravel-package-tools": "^1.14.0" }, From 929876e70f9c20472296ca52ced6a90324719a33 Mon Sep 17 00:00:00 2001 From: Pete Bishop Date: Wed, 5 Feb 2025 13:32:09 +0000 Subject: [PATCH 3/4] New minimum version required by /laravel to allow download --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 49939c41..be4cf679 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "laravel/prompts": "^0.1.1|^0.2|^0.3", "nativephp/laravel": "^1.0@beta", "nativephp/php-bin": "^0.5.1", - "spatie/laravel-package-tools": "^1.14.0" + "spatie/laravel-package-tools": "^1.16.4" }, "require-dev": { "laravel/pint": "^1.0", From ebc5dca2b64604a5eed60d774324bf5b280c008e Mon Sep 17 00:00:00 2001 From: Pete Bishop Date: Wed, 5 Feb 2025 13:38:27 +0000 Subject: [PATCH 4/4] Update test package dependency --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 79cffd4b..ec94779e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,12 +20,12 @@ jobs: - laravel: 10.* testbench: ^8.18 carbon: ^2.67 - laravel-package-tools: ^1.16 + laravel-package-tools: ^1.16.4 collision: 7.* - laravel: 11.* testbench: 9.* carbon: "^2.67|^3.0" - laravel-package-tools: ^1.16 + laravel-package-tools: ^1.16.4 collision: ^8.1.1 exclude: - laravel: 11.*