Skip to content

Commit

Permalink
[fix compile] winutil used by another process (ChrisTitusTech#2680)
Browse files Browse the repository at this point in the history
* fix winutil used by another process

- remove winutil.ps1 if it is readonly (also works if another process is using it) to minimize failed compiles.

* fix action error

* Oops, typo

* make it more compact
  • Loading branch information
MyDrift-user committed Sep 10, 2024
1 parent 95db85f commit 473f04d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ param (
[switch]$SkipPreprocessing,
[string]$Arguments
)

if ((Get-Item ".\winutil.ps1" -ErrorAction SilentlyContinue).IsReadOnly) {
Remove-Item ".\winutil.ps1" -Force
}

$OFS = "`r`n"
$scriptname = "winutil.ps1"
$workingdir = $PSScriptRoot
Expand Down

0 comments on commit 473f04d

Please sign in to comment.