From 779806b871a678fdede4e63d43f631619a3408a4 Mon Sep 17 00:00:00 2001 From: Christian Crowhurst Date: Fri, 29 Apr 2022 15:14:51 +0100 Subject: [PATCH 1/2] chore: ensure advanced use steps works on windows --- README.md | 2 +- register-azure-devops-npm-auth.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01d45b0..b07f106 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ If you want to use your own Azure Active Directory application, it's possible to ```javascript "scripts": { - "preinstall": "azure-devops-npm-auth --client_id='xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' --tenant_id='xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" + "preinstall": "azure-devops-npm-auth --client_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --tenant_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ... }, ``` diff --git a/register-azure-devops-npm-auth.ps1 b/register-azure-devops-npm-auth.ps1 index fe01fe0..17497af 100644 --- a/register-azure-devops-npm-auth.ps1 +++ b/register-azure-devops-npm-auth.ps1 @@ -128,7 +128,7 @@ process { Write-Host '******************* Summary: start ******************************' Write-Host "App/Client ID: $($app.appId)" Write-Host "AD Tenant ID: $tenantId" - Write-Host ("To authenticate to Azure npm feed: azure-devops-npm-auth --client_id='{0}' --tenant_id='{1}'" -f $app.appId, $tenantId) -ForegroundColor Yellow + Write-Host ("To authenticate to Azure npm feed: azure-devops-npm-auth --client_id={0} --tenant_id={1}" -f $app.appId, $tenantId) -ForegroundColor Yellow Write-Host '******************* Summary: end ********************************' } From d6434fc1ba8f8d749ebf4b87eb7e0151ac463aed Mon Sep 17 00:00:00 2001 From: Christian Crowhurst Date: Fri, 29 Apr 2022 15:41:07 +0100 Subject: [PATCH 2/2] chore: add npx to preinstall script examples --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b07f106..31215cc 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ If you want to use your own Azure Active Directory application, it's possible to ```javascript "scripts": { - "preinstall": "azure-devops-npm-auth --client_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --tenant_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + "preinstall": "npx azure-devops-npm-auth --client_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --tenant_id=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ... }, ``` @@ -72,14 +72,14 @@ This will open your default browser where you will need to login to Azure with c To disable authentication within CI environments add the `--ci` flag which skips authentication when the `TF_BUILD` environment variable is set (which is automatically set in Azure DevOps build pipelines): ```javascript "scripts": { - "preinstall": "azure-devops-npm-auth --ci" + "preinstall": "npx azure-devops-npm-auth --ci" ... }, ``` It's also possible to specify a custom environment variable: ```javascript "scripts": { - "preinstall": "azure-devops-npm-auth --ci=MY_CUSTOM_VARIABLE" + "preinstall": "npx azure-devops-npm-auth --ci=MY_CUSTOM_VARIABLE" ... }, ``` @@ -90,7 +90,7 @@ You can pass in a path to customize the directory to look in for the project's . ```javascript "scripts": { - "preinstall": "azure-devops-npm-auth --project_base_path=./configs" + "preinstall": "npx azure-devops-npm-auth --project_base_path=./configs" ... }, ```