Skip to content

Commit 66bd1e2

Browse files
authored
Update Shared.ps1
1 parent 4770584 commit 66bd1e2

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

Scripts/Shared.ps1

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,9 @@ function Setup-NuGet {
7575
$nugetUrl = $repoConfiguration.Requirements.Nuget.Url
7676
Invoke-WebRequest -Uri $nugetUrl -OutFile $nugetPath
7777

78-
Add-ToSystemPath -installPath $installPath
79-
8078
Write-Host " Nuget Installation and configuration completed successfully!"
8179
}
8280

83-
function Add-ToSystemPath {
84-
param([string]$installPath)
85-
$path = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
86-
87-
if ($path -notlike "*$installPath*") {
88-
$newPath = "$path;$installPath"
89-
[Environment]::SetEnvironmentVariable("Path", $newPath, [EnvironmentVariableTarget]::User)
90-
# Update the current session's PATH environment variable
91-
$env:Path += ";$installPath"
92-
Write-Host "Path added to user PATH: $installPath"
93-
} else {
94-
Write-Host "Path already exists in user PATH: $installPath"
95-
}
96-
}
97-
9881
function Get-RepositoryConfiguration () {
9982
$repoConfigFile = Join-Path $repositoryRootPath 'repoConfiguration.json'
10083

@@ -234,4 +217,4 @@ function Get-RepositoryRootPath () {
234217
return $rootPath
235218
}
236219

237-
$repositoryRootPath = Get-RepositoryRootPath
220+
$repositoryRootPath = Get-RepositoryRootPath

0 commit comments

Comments
 (0)