From e992b4192cac3eb1f8db7e183451936c5ba1620c Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Mon, 4 May 2020 11:31:44 +0200 Subject: [PATCH] Panic if we cannot set env var --- azure/aci.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure/aci.go b/azure/aci.go index 933f8a79..7992d8d8 100644 --- a/azure/aci.go +++ b/azure/aci.go @@ -26,7 +26,10 @@ import ( func init() { // required to get auth.NewAuthorizerFromCLI() to work, otherwise getting "The access token has been obtained for wrong audience or resource 'https://vault.azure.net'." - _ = os.Setenv("AZURE_KEYVAULT_RESOURCE", "https://management.azure.com") + err := os.Setenv("AZURE_KEYVAULT_RESOURCE", "https://management.azure.com") + if err != nil { + panic("unable to set environment variable AZURE_KEYVAULT_RESOURCE") + } } func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) (c containerinstance.ContainerGroup, err error) {