Skip to content

Commit 61a6d0c

Browse files
author
Zach Olinske
committed
fix: resolve OutputPath to absolute for Export-Parquet .NET cmdlet compatibility
1 parent 494d965 commit 61a6d0c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/templates/finops-hub/test/Generate-MultiCloudTestData.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,11 @@ Write-Host " Output Path: $OutputPath"
20742074
if ($PSBoundParameters.ContainsKey('Seed')) { Write-Host " Random Seed: $Seed" }
20752075
Write-Host ""
20762076

2077+
# Resolve OutputPath to absolute — Export-Parquet (a .NET cmdlet) uses
2078+
# [IO.Directory]::GetCurrentDirectory() which may differ from PowerShell's $PWD.
2079+
# Converting to absolute here avoids "Could not find a part of the path" errors.
2080+
$OutputPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($OutputPath)
2081+
20772082
# Create output directory
20782083
if (-not (Test-Path $OutputPath))
20792084
{
@@ -2889,4 +2894,4 @@ else
28892894
Write-Host " 3. Start ADF triggers to process the data"
28902895
}
28912896

2892-
Write-Host ""
2897+
Write-Host ""

0 commit comments

Comments
 (0)