Skip to content

Commit

Permalink
Merge pull request #151 from theohbrothers/fix/module-improve-process…
Browse files Browse the repository at this point in the history
…ing-of-default-project-directory

Fix (module): Improve processing of default project directory
  • Loading branch information
joeltimothyoh committed Aug 1, 2024
2 parents 6c7c92f + bd1a566 commit f4ea3fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PSModulePublisher/Private/Get-ProjectVariables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function Get-ProjectVariables {
if ($env:PROJECT_DIRECTORY) {
$script:PROJECT['BASE_DIR'] = $env:PROJECT_DIRECTORY | Convert-Path
}else {
$script:PROJECT['SUPERPROJECT_BASE_DIR'] = if (git rev-parse --show-superproject-working-tree) { git rev-parse --show-superproject-working-tree | Convert-Path }
$script:PROJECT['BASE_DIR'] = if ($script:PROJECT['SUPERPROJECT_BASE_DIR']) { $script:PROJECT['SUPERPROJECT_BASE_DIR'] } else { git rev-parse --show-toplevel | Convert-Path }
$script:PROJECT['SUPERPROJECT_BASE_DIR'] = if (git rev-parse --show-superproject-working-tree) { Convert-Path (git rev-parse --show-superproject-working-tree) }
$script:PROJECT['BASE_DIR'] = if ($script:PROJECT['SUPERPROJECT_BASE_DIR']) { $script:PROJECT['SUPERPROJECT_BASE_DIR'] } else { Convert-Path (git rev-parse --show-toplevel) }
}
$script:PROJECT['BUILD_DIR'] = Join-Path $script:PROJECT['BASE_DIR'] 'build'
$script:PROJECT['SOURCE_DIR'] = Join-Path $script:PROJECT['BASE_DIR'] 'src'
Expand Down

0 comments on commit f4ea3fb

Please sign in to comment.