From ff7e59d19c57dcc8d06443249585c4512020cb81 Mon Sep 17 00:00:00 2001 From: Alex Kucksdorf Date: Fri, 2 Sep 2022 13:03:47 +0200 Subject: [PATCH] [semver:patch] #22 Fix login for service principals with passwords starting with `-` --- src/commands/login-with-service-principal.yml | 6 +++--- .../login-with-user-or-service-principal.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/commands/login-with-service-principal.yml b/src/commands/login-with-service-principal.yml index 6c201fe..57b39eb 100644 --- a/src/commands/login-with-service-principal.yml +++ b/src/commands/login-with-service-principal.yml @@ -28,6 +28,6 @@ steps: command: > az login \ --service-principal \ - --tenant $<> \ - -u $<> \ - -p "$<>" + --tenant=$<> \ + -u=$<> \ + -p="$<>" diff --git a/src/commands/login-with-user-or-service-principal.yml b/src/commands/login-with-user-or-service-principal.yml index 5863553..17513b7 100644 --- a/src/commands/login-with-user-or-service-principal.yml +++ b/src/commands/login-with-user-or-service-principal.yml @@ -63,16 +63,16 @@ steps: echo "User credentials detected; logging in with user" az login \ <<#parameters.alternate-tenant>> \ - --tenant $<> <> \ - -u $<> \ - -p "$<>" + --tenant=$<> <> \ + -u=$<> \ + -p="$<>" elif [ -n "${<< parameters.azure-sp >>}" ]; then echo "Service Principal credentials detected; logging in with Service Principal" az login \ --service-principal \ - --tenant $<> \ - -u $<> \ - -p "$<>" + --tenant=$<> \ + -u=$<> \ + -p="$<>" else echo "Login failed; neither user nor Service Principal credentials were provided" exit 1