Skip to content

Commit

Permalink
fix reinstall native dependency (#18582)
Browse files Browse the repository at this point in the history
* Generate absolute path for symlink to reinstall native dependency
  • Loading branch information
praveenkuttappan authored and danieljurek committed Nov 10, 2021
1 parent 22b882d commit 339823a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eng/pipelines/templates/steps/use-node-test-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ steps:
}
# Map from the symlink path to the target path (npm has issues installing into symlink dirs)
# Example: common/temp/node_modules/.pnpm/keytar@5.6.0/node_modules/keytar
$targetPath = (Get-Item $symlink).Target
$symlinkInfo = Get-Item $symlink
$targetPath = [IO.Path]::Combine($symlinkInfo.Parent, $symlinkInfo.Target)
Write-Host "Target of symlink : $($targetPath)"
# Need to run "npm install" at path containing "node_modules" folder
# Example: common/temp/node_modules/.pnpm/keytar@5.6.0
Expand All @@ -42,7 +44,6 @@ steps:
# pnpm v6 replaces '/' in package names with '+' to reduce nesting directory in virtual store so we need to
# change it back
$packageAtVersion = $packageAtVersion.Replace("+", "/")
# Check if package has org name. for e.g @azure/msal-node-enxtensions
# This returns either @azure or .pnpm( if no org is present)
$packageParentName = Split-path -Leaf (Split-Path -Parent -Resolve $packageInstallPath)
Expand All @@ -62,4 +63,3 @@ steps:
}
displayName: Reinstall native dependencies
condition: ne(variables['NodeTestVersion'], variables['NodeVersion'])

0 comments on commit 339823a

Please sign in to comment.