diff --git a/app/Application.php b/app/Application.php index a57be91b..1dbd58e3 100644 --- a/app/Application.php +++ b/app/Application.php @@ -6,7 +6,7 @@ class Application extends \Hyde\Foundation\Application { - final public const APP_VERSION = '0.7.16'; + final public const APP_VERSION = '0.7.17'; public function getCachedPackagesPath(): string { diff --git a/app/Commands/SelfUpdateCommand.php b/app/Commands/SelfUpdateCommand.php index 3de5dc3e..7450a574 100644 --- a/app/Commands/SelfUpdateCommand.php +++ b/app/Commands/SelfUpdateCommand.php @@ -41,6 +41,7 @@ use function json_decode; use function is_writable; use function curl_setopt; +use function str_replace; use function array_combine; use function str_ends_with; use function clearstatcache; @@ -128,7 +129,7 @@ public function handle(): int $this->info('The application has been updated successfully.'); - // Verify the application version + // Verify the application version (// Fixme: This shows the old version when using Composer to update) passthru('hyde --version --ansi'); // Now we can exit the application, we do this manually to avoid issues when Laravel tries to clean up the application @@ -431,19 +432,13 @@ protected function runComposerInElevatedPrompt(): void $outputStream = realpath($outputStream); // Set up a batch script so we can redirect the output to our stream file - $batch = << $outputStream - echo --END-- >> $outputStream - CMD; + $batch = str_replace('{{ outputStream }}', $outputStream, file_get_contents(__DIR__.'/../bin/composer-update-proxy.bat')); $updateScript = "$path.bat"; file_put_contents($updateScript, $batch); $updateScript = realpath($updateScript); - $vbs = << {{ outputStream }} +echo --END-- >> {{ outputStream }} \ No newline at end of file diff --git a/app/bin/request-composer-user-access-control.vbs b/app/bin/request-composer-user-access-control.vbs new file mode 100644 index 00000000..1da73d02 --- /dev/null +++ b/app/bin/request-composer-user-access-control.vbs @@ -0,0 +1,2 @@ +Set UAC = CreateObject("Shell.Application") +UAC.ShellExecute "cmd.exe", "/c {{ updateScript }}", "", "runas", 0 \ No newline at end of file diff --git a/builds/hyde b/builds/hyde index cbff222c..129c99d1 100755 Binary files a/builds/hyde and b/builds/hyde differ