Fix problem with running get latest from batch file

This commit is contained in:
Steve Streeting 2023-06-26 11:28:23 +01:00
parent 82fd0bfb4f
commit b9e4ae2fb6

View File

@ -5,9 +5,11 @@ function Find-DefaultTarget {
[string]$preferred = "Editor"
)
$sourcefolder = Join-Path (Resolve-Path $srcfolder) "Source"
# Enumerate the Target.cs files in Source folder and use the default one
# This lets us not assume what the modules are called exactly
$targetFiles = Get-ChildItem (Join-Path $srcfolder "Source" "*.Target.cs")
$targetFiles = Get-ChildItem "$sourcefolder\*.Target.cs"
foreach ($file in $targetfiles) {
if ($file.Name -like "*$preferred.Target.cs") {