Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions toolkit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ all: toolchain go-tools chroot-tools
# its help will be displayed at the top of the help output.
include $(SCRIPTS_DIR)/help.mk

# Set-up the Azure configuration for the build
include $(SCRIPTS_DIR)/azure_config.mk

# Misc function defines
# Variable prerequisite tracking
include $(SCRIPTS_DIR)/utils.mk
Expand Down
9 changes: 9 additions & 0 deletions toolkit/scripts/azure_config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# By default pass original user's Azure configuration if running as root.
# Running as root is required by how the toolkit operates while
# in most cases the user expects to still use their Azure configuration, thus the default.
ifneq ($(SUDO_USER),)
export AZURE_CONFIG_DIR ?= $(shell sudo -u "$(SUDO_USER)" bash -c 'echo $${AZURE_CONFIG_DIR:-$${HOME}/.azure}')
endif
Loading