From 44a01ffef14170c134c7a55a3fbe2fcd49449d4c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Aug 2024 02:50:41 +0200 Subject: [PATCH] Report unexpected path conversions --- scripts/Common/Scripts/Config.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Common/Scripts/Config.ps1 b/scripts/Common/Scripts/Config.ps1 index c72bb5eb..540fe3bd 100644 --- a/scripts/Common/Scripts/Config.ps1 +++ b/scripts/Common/Scripts/Config.ps1 @@ -39,6 +39,10 @@ $null = New-Module { $result = Receive-Job -Wait $job; + if ((Split-Path -Leaf $Path) -ne (Split-Path -Leaf $result)) { + Write-Error "The result of the path conversion of ``$Path`` was unexpacted: ``$result``"; + } + if ($job.State -ne ([System.Management.Automation.JobState]::Completed)) { Write-Error "An error occurred while converting ``$Path`` to a Linux path.`nOutput: ``$result``"; }