Skip to content

Commit d978aa5

Browse files
PeteBishwhipPete Bishop
and
Pete Bishop
authored
Update logic to ensure TTY mode is appropriately disabled (#162)
* Update logic to ensure TTY mode is appropriately disabled Fixes NativePHP/laravel#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. * Ensure beta is allowed to be requested * New minimum version required by /laravel to allow download * Update test package dependency --------- Co-authored-by: Pete Bishop <[email protected]>
1 parent b0a8aee commit d978aa5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Diff for: .github/workflows/run-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- laravel: 10.*
2121
testbench: ^8.18
2222
carbon: ^2.67
23-
laravel-package-tools: ^1.16
23+
laravel-package-tools: ^1.16.4
2424
collision: 7.*
2525
- laravel: 11.*
2626
testbench: 9.*
2727
carbon: "^2.67|^3.0"
28-
laravel-package-tools: ^1.16
28+
laravel-package-tools: ^1.16.4
2929
collision: ^8.1.1
3030
exclude:
3131
- laravel: 11.*

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"php": "^8.1",
3535
"illuminate/contracts": "^10.0|^11.0",
3636
"laravel/prompts": "^0.1.1|^0.2|^0.3",
37-
"nativephp/laravel": "^1.0",
37+
"nativephp/laravel": "^1.0@beta",
3838
"nativephp/php-bin": "^0.5.1",
39-
"spatie/laravel-package-tools": "^1.14.0"
39+
"spatie/laravel-package-tools": "^1.16.4"
4040
},
4141
"require-dev": {
4242
"laravel/pint": "^1.0",

Diff for: src/Commands/BuildCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Native\Electron\Facades\Updater;
1010
use Native\Electron\Traits\InstallsAppIcon;
1111
use Native\Electron\Traits\OsAndArch;
12+
use Symfony\Component\Process\Process as SymfonyProcess;
1213

1314
class BuildCommand extends Command
1415
{
@@ -60,7 +61,7 @@ public function handle(): void
6061
Process::path(__DIR__.'/../../resources/js/')
6162
->env($this->getEnvironmentVariables())
6263
->forever()
63-
->tty(PHP_OS_FAMILY != 'Windows' && ! $this->option('no-interaction'))
64+
->tty(SymfonyProcess::isTtySupported() && ! $this->option('no-interaction'))
6465
->run("npm run {$buildCommand}:{$os}", function (string $type, string $output) {
6566
echo $output;
6667
});

0 commit comments

Comments
 (0)