fdedcf53bb
Basic checks / Compilation, Unit and Integration Tests (push) Has been cancelled
Basic checks / Hygiene and Layering (push) Has been cancelled
Basic checks / Warm up node modules cache (push) Has been cancelled
Check Format and Lint / lint-and-format (push) Has been cancelled
25 lines
697 B
PowerShell
25 lines
697 B
PowerShell
# Function to create the symbolic link
|
|
function Connect-Locations {
|
|
param(
|
|
[string]$targetPath,
|
|
[string]$linkPath
|
|
)
|
|
|
|
if (Test-Path $linkPath -PathType Any) {
|
|
Write-Host "Removing existing Symbolic link at '$linkPath', before creating new one."
|
|
cmd /c rmdir /s /q $linkPath
|
|
}
|
|
|
|
Start-Sleep 1
|
|
|
|
Write-Host "Creating symbolic link '$targetPath' -> '$linkPath'"
|
|
New-Item -ItemType SymbolicLink -Path $linkPath -Target $targetPath
|
|
}
|
|
|
|
# Get the target and link paths from script parameters
|
|
$targetPath = $args[0]
|
|
$linkPath = $args[1]
|
|
|
|
# Call the function to create the symbolic link
|
|
Connect-Locations -targetPath $targetPath -linkPath $linkPath
|