Skip to content

Commit d8cf4cc

Browse files
mechelonmpociot
andauthored
Use PowerShell command as wmic fallback (#476)
* Testing Windows wmic fix * Testing wmic fix * fix: use react/dns fork with Windows WMIC fallback fix * remove ensureEnvironmentSetup and isWmicAvailable methods from ShareCommand * Update composer.json * Updated dependency * Update phar --------- Co-authored-by: Marcel Pociot <m.pociot@gmail.com>
1 parent f136afd commit d8cf4cc

5 files changed

Lines changed: 7 additions & 27 deletions

File tree

app/Commands/ShareCommand.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function handle()
4040
terminal()->clear();
4141

4242
banner();
43-
$this->ensureEnvironmentSetup();
4443
$this->ensureExposeSetup();
4544

4645
info("Expose version v" . config('app.version'), options: OutputInterface::VERBOSITY_VERBOSE);
@@ -162,30 +161,6 @@ protected function detectOperatingSystem(): void
162161
$this->isWindows = strpos(php_uname('s'), 'Windows') !== false;
163162
}
164163

165-
protected function ensureEnvironmentSetup(): void
166-
{
167-
if (!$this->isWindows()) {
168-
return;
169-
}
170-
if (!$this->isWmicAvailable()) {
171-
error('The "wmic" command is not available on this Windows machine.');
172-
error(
173-
'Please refer to the documentation for more information: https://expose.dev/docs/troubleshooting',
174-
abort: true
175-
);
176-
}
177-
}
178-
179-
protected function isWmicAvailable(): bool
180-
{
181-
$output = [];
182-
$exitCode = 0;
183-
184-
exec('wmic /?', $output, $exitCode);
185-
186-
return $exitCode === 0;
187-
}
188-
189164
protected function isWindows(): bool
190165
{
191166
if ($this->isWindows === null) {

builds/expose

35.6 KB
Binary file not shown.

builds/expose.phar

35.6 KB
Binary file not shown.

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"nyholm/psr7": "^1.3",
5454
"octoper/cuzzle": "dev-master",
5555
"phpunit/phpunit": "^10.5.1",
56-
"react/async": "^4.3"
56+
"react/async": "^4.3",
57+
"react/dns": "1.x-dev"
5758
},
5859
"config": {
5960
"optimize-autoloader": true,
@@ -71,6 +72,10 @@
7172
}
7273
},
7374
"repositories": [
75+
{
76+
"type": "git",
77+
"url": "https://github.com/beyondcode/react-dns"
78+
},
7479
{
7580
"type": "git",
7681
"url": "https://github.com/beyondcode/pawl"

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
|
2727
*/
2828

29-
'version' => '3.2.0',
29+
'version' => '3.2.1',
3030

3131
/*
3232
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)