From 6fc3232637663c95b442f93215ad8a41bfc7c987 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 7 Dec 2020 14:16:06 -0500 Subject: [PATCH] [fix] Set INSTALLUSERNAME to the user running the script Resolves #2243 --- setup/so-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index bd16f9cd2..38077269f 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1321,7 +1321,7 @@ elasticsearch_pillar() { parse_install_username() { # parse out the install username so things copy correctly - INSTALLUSERNAME=$(pwd | sed -E 's/\// /g' | awk '{ print $2 }') + INSTALLUSERNAME=${SUDO_USER:-${USER}} } patch_pillar() {