Compare commits

..

No commits in common. "d4357d0925ff0276c6b7d0f6c9262ca17c401b62" and "1f498de8fb950eb32775b47fa45ac73d018d74b8" have entirely different histories.

View file

@ -30,30 +30,21 @@ $null = New-Module {
[string] $Path [string] $Path
) )
$completed = $false; $job = Start-Job {
$env:Value = Resolve-Path $Using:Path;
$env:WSLENV = "Value/p";
$result = wsl -- bash -c 'echo "$Value"';
wsl -e printf "%q" "$result";
};
while (-not $completed) { $result = Receive-Job -Wait $job;
$job = Start-Job {
$env:Value = Resolve-Path $Using:Path;
$env:WSLENV = "Value/p";
$result = wsl -- bash -c 'echo "$Value"';
wsl -e printf "%q" "$result";
};
$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 ((Split-Path -Leaf $Path) -ne (Split-Path -Leaf $result)) { if ($job.State -ne ([System.Management.Automation.JobState]::Completed)) {
Write-Error "The result of the path conversion of ``$Path`` was unexpected: ``$result``"; Write-Error "An error occurred while converting ``$Path`` to a Linux path.`nOutput: ``$result``";
continue;
}
if ($job.State -ne ([System.Management.Automation.JobState]::Completed)) {
Write-Error "An error occurred while converting ``$Path`` to a Linux path.`nOutput: ``$result``";
continue;
}
$completed = $true;
} }
$result; $result;