diff --git a/images/ubuntu/scripts/build/configure-system.sh b/images/ubuntu/scripts/build/configure-system.sh index 652083eb2..5a9e44f04 100644 --- a/images/ubuntu/scripts/build/configure-system.sh +++ b/images/ubuntu/scripts/build/configure-system.sh @@ -20,7 +20,7 @@ chmod 755 $IMAGE_FOLDER ENVPATH=$(grep 'PATH=' /etc/environment | head -n 1 | sed -z 's/^PATH=*//') ENVPATH=${ENVPATH#"\""} ENVPATH=${ENVPATH%"\""} -add_etc_environment_variable "PATH" "${ENVPATH}" +replace_etc_environment_variable "PATH" "${ENVPATH}" echo "Updated /etc/environment: $(cat /etc/environment)" # Сlean yarn and npm cache diff --git a/images/ubuntu/scripts/helpers/etc-environment.sh b/images/ubuntu/scripts/helpers/etc-environment.sh index 4255c9d01..6ffafd01c 100644 --- a/images/ubuntu/scripts/helpers/etc-environment.sh +++ b/images/ubuntu/scripts/helpers/etc-environment.sh @@ -27,7 +27,7 @@ replace_etc_environment_variable() { local variable_value=$2 # modify /etc/environemnt in place by replacing a string that begins with variable_name - sudo sed -i -e "s%^${variable_name}=.*$%${variable_name}=\"${variable_value}\"%" /etc/environment + sudo sed -i -e "s%^${variable_name}=.*$%${variable_name}=${variable_value}%" /etc/environment } set_etc_environment_variable() {