Skip to content

Commit 88038c8

Browse files
authored
DYN-9590 Update setnpmreg script (DynamoDS#16523)
1 parent a6922f4 commit 88038c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/setnpmreg.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function createNpmrcFile {
99
[Parameter(Mandatory = $true)][string]$registry
1010
)
1111
Write-Host "Creating .npmrc file with registry=$registry" -ForegroundColor Blue
12-
New-Item -Path . -Name ".npmrc" -ItemType "file" -Value "registry=$registry" -Force
12+
New-Item -Path . -Name .npmrc -ItemType File -Value "registry=$registry`n" -Force
1313
}
1414

1515
try {
@@ -19,6 +19,7 @@ try {
1919
if ($response.StatusCode -eq 200) {
2020
Write-Host "adsk npm registry is reachable" -ForegroundColor Green
2121
createNpmrcFile -registry $adskNpmRegistry
22+
Write-Output "//npm.autodesk.com/artifactory/api/npm/:_authToken=\`${NPM_TOKEN}" | Out-File -Append -FilePath .npmrc
2223
}
2324
else {
2425
Write-Host "adsk npm registry is not reachable" -ForegroundColor Red

0 commit comments

Comments
 (0)