Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simples fixes to 'Compile.ps1' Script #2971

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ $($jsonAsObject | ConvertTo-Json -Depth 3)
"@

$sync.configs.$($psitem.BaseName) = $json | ConvertFrom-Json
$script_content.Add($(Write-Output "`$sync.configs.$($psitem.BaseName) = @'`n$json`n'@ `| ConvertFrom-Json" ))
$script_content.Add($(Write-Output "`$sync.configs.$($psitem.BaseName) = @'`r`n$json`r`n'@ `| ConvertFrom-Json" ))
}

# Read the entire XAML file as a single string, preserving line breaks
Expand Down Expand Up @@ -125,10 +125,12 @@ Write-Progress -Activity "Compiling" -Completed

Update-Progress -Activity "Validating" -StatusMessage "Checking winutil.ps1 Syntax" -Percent 0
try {
$null = Get-Command -Syntax .\winutil.ps1
Get-Command -Syntax .\winutil.ps1 | Out-Null
} catch {
Write-Warning "Syntax Validation for 'winutil.ps1' has failed"
Write-Host "$($Error[0])" -ForegroundColor Red
Pop-Location # Restore previous location before exiting...
exit 1
}
Write-Progress -Activity "Validating" -Completed

Expand Down