Skip to content

Commit

Permalink
Simplify parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov committed May 29, 2019
1 parent dd0029a commit 4a7aac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azure-ts-msi-keyvault-rbac/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const currentPrincipal = clientConfig.apply(c =>
// Current, only service principal ID is available in the context
? c.servicePrincipalObjectId
// If logged in with a user, find their ID via Azure CLI
: execSync("az ad signed-in-user show --query objectId").toString().replace(/[^A-Za-z0-9/-]/g, ""));
: <string>JSON.parse(execSync("az ad signed-in-user show --query objectId").toString()));

// Key Vault to store secrets (e.g. Blob URL with SAS)
const vault = new azure.keyvault.KeyVault("vault", {
Expand Down

0 comments on commit 4a7aac0

Please sign in to comment.