Merge pull request #11 from theupriser/bugfix/iso-sudo-env

fix: sudo mkarchiso keeps the release tag's variables
This commit is contained in:
theupriser authored and GitHub committed 2026-09-29 22:39:46 +02:00
commit fbbc22472e
1 file changed
+2 -1
+2 -1
View File
@@ -201,7 +201,8 @@ run_build() {
[ -d "$outFolder/$_profile" ] || mkdir -p "$outFolder/$_profile" [ -d "$outFolder/$_profile" ] || mkdir -p "$outFolder/$_profile"
cd ${work_dir}/archiso/ cd ${work_dir}/archiso/
sudo mkarchiso -v -w ${work_dir} -o "$outFolder/$_profile" ${work_dir}/archiso/ # sudo drops the environment: the release tag's file name and label (profiledef.sh) must get through.
sudo --preserve-env=STEAMIFY_ISO_VERSION,STEAMIFY_BUILD_STAMP mkarchiso -v -w ${work_dir} -o "$outFolder/$_profile" ${work_dir}/archiso/
# $USER is empty when this runs as root (e.g. in a container): an empty # $USER is empty when this runs as root (e.g. in a container): an empty
# chown failed and aborted the rest (the build was done, the exit code 1). # chown failed and aborted the rest (the build was done, the exit code 1).
sudo chown "${SUDO_USER:-${USER:-$(id -un)}}" "$outFolder" sudo chown "${SUDO_USER:-${USER:-$(id -un)}}" "$outFolder"