fix: root package.json directory, fixes #59

This commit is contained in:
Pauline 2024-07-31 02:46:30 -04:00 • committed by GitHub
parent 9b8d2b3f6e
commit 989d08bb2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,8 +69,9 @@ function Add-DirectoryToPath($directory) {
# resets PATH to ensure the script doesn't have stale Path entries
Reset-Path
# gets project dir (get grandparent dir from script location: <PROJECT_ROOT>\packages\scripts\setup.ps1)
$projectRoot = Split-Path -Path $PSScriptRoot -Parent
# gets project dir (get dir from script location: <PROJECT_ROOT>\packages\scripts\setup.ps1)
$packagesRoot = Split-Path -Path $PSScriptRoot -Parent
$projectRoot = Split-Path -Path $packagesRoot -Parent
$packageJson = Get-Content -Raw -Path "$projectRoot\package.json" | ConvertFrom-Json
# valid winget exit statuses