Skip to content

Commit 6ead217

Browse files
Refactor main.ps1 to use Join-Path for constructing folder paths, enhancing readability and maintainability
1 parent 62cfad3 commit 6ead217

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/main.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ LogGroup 'Loading inputs' {
1919
$moduleName = ($env:GITHUB_ACTION_INPUT_Name | IsNullOrEmpty) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name
2020
Write-Host "Module name: [$moduleName]"
2121

22-
$moduleSourceFolderPath = Resolve-Path -Path "$env:GITHUB_ACTION_INPUT_Path/src" | Select-Object -ExpandProperty Path
22+
$moduleSourceFolderPath = Join-Path -Path $env:GITHUB_ACTION_INPUT_Path 'src'
2323
if (-not (Test-Path -Path $moduleSourceFolderPath)) {
2424
throw "Module path [$moduleSourceFolderPath] does not exist."
2525
}
2626

27-
$modulesOutputFolderPath = Resolve-Path -Path "$env:GITHUB_ACTION_INPUT_Path/outputs/module" | Select-Object -ExpandProperty Path
27+
$modulesOutputFolderPath = Join-Path -Path $env:GITHUB_ACTION_INPUT_Path 'outputs/module'
2828
Write-Host "Module output path: [$modulesOutputFolderPath]"
29-
$docsOutputFolderPath = Resolve-Path -Path "$env:GITHUB_ACTION_INPUT_Path/outputs/docs" | Select-Object -ExpandProperty Path
29+
$docsOutputFolderPath = Join-Path -Path $env:GITHUB_ACTION_INPUT_Path 'outputs/docs'
3030
Write-Host "Docs output path: [$docsOutputFolderPath]"
3131
}
3232

0 commit comments

Comments
 (0)