From cc7d2e384858c32dc05414eabe4bc6cceecfa0c4 Mon Sep 17 00:00:00 2001 From: Joe Date: Sat, 20 Dec 2025 20:59:10 -0600 Subject: [PATCH] Refactor Windows install script to streamline executable path handling and improve readability. Updated the path variable for the executable and simplified the gsudo commands for stopping the process and copying the executable. --- install.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/install.ps1 b/install.ps1 index bbd7a312..62c9148d 100644 --- a/install.ps1 +++ b/install.ps1 @@ -4,9 +4,8 @@ param([string]$Mode = "release") Set-Location $PSScriptRoot cargo build "--$Mode" -& ".\target\$Mode\rojo.exe" build plugin.project.json --plugin Rojo.rbxm +$ExePath = ".\target\$Mode\rojo.exe" +& "$ExePath" build plugin.project.json --plugin Rojo.rbxm if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" } -gsudo { - Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue - Copy-Item ".\target\$Mode\rojo.exe" "C:\Program Files\Rojo\" -} +gsudo Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue +gsudo Copy-Item "$ExePath" "C:\Program Files\Rojo\"