From b1d6825e9e39a78ea488087d63283ea4777ec292 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 5 Jan 2025 14:40:42 +0100 Subject: [PATCH] fix: format the SVR.JS configuration file in the installer --- installer.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.ps1 b/installer.ps1 index 003df79..0f1b79b 100644 --- a/installer.ps1 +++ b/installer.ps1 @@ -138,7 +138,7 @@ if (Test-Path -Path "$env:SYSTEMDRIVE\svrjs\svrjs\svr.compressed" -PathType "Lea Start-Process -FilePath "$nodejsDir\node.exe" -ArgumentList "$env:SYSTEMDRIVE\svrjs\svrjs\svr.js" -Wait Pop-Location } -Start-Process -FilePath "$nodejsDir\node.exe" -ArgumentList "-e `"var fs=require('fs'),config=JSON.parse(fs.readFileSync('$env:SYSTEMDRIVE\\svrjs\\svrjs\\config.json').toString());config.wwwroot='$env:SYSTEMDRIVE\\svrjs\\wwwroot',fs.writeFileSync('$env:SYSTEMDRIVE\\svrjs\\svrjs\\config.json',JSON.stringify(config));`"" -Wait +Start-Process -FilePath "$nodejsDir\node.exe" -ArgumentList "-e `"var fs=require('fs'),config=JSON.parse(fs.readFileSync('$env:SYSTEMDRIVE\\svrjs\\svrjs\\config.json').toString());config.wwwroot='$env:SYSTEMDRIVE\\svrjs\\wwwroot',fs.writeFileSync('$env:SYSTEMDRIVE\\svrjs\\svrjs\\config.json',JSON.stringify(config,null,2));`"" -Wait if (Test-Path -Path "$env:SYSTEMDRIVE\svrjs\svrjs\wwwroot" -PathType "Container") { if (Test-Path -Path "$env:SYSTEMDRIVE\svrjs\wwwroot") { Remove-Item -Path "$env:SYSTEMDRIVE\svrjs\wwwroot" -Recurse -Force | Out-Null