We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5345c41 commit 5044543Copy full SHA for 5044543
rootfs/scripts/build-ubuntu-rootfs.sh
@@ -179,9 +179,14 @@ image_preproccessing_iot() {
179
180
echo "[INFO][iot][ubuntu] Downloading ISO..."
181
182
- # Derive a sane ISO_NAME if not provided
183
- if [[ -z "$ISO_NAME" ]]; then
184
- ISO_NAME=$(basename "${IMG_URL%%\?*}")
+ # SAFE under set -u:
+ ISO_NAME="${ISO_NAME-}"
+ if [[ -z "${ISO_NAME}" ]]; then
185
+ if [[ -z "${IMG_URL-}" ]]; then
186
+ echo "[ERROR] IMG_URL is empty/unset; cannot derive ISO_NAME."
187
+ exit 1
188
+ fi
189
+ ISO_NAME="$(basename "${IMG_URL%%\?*}")"
190
[[ -z "$ISO_NAME" || "$ISO_NAME" == "/" ]] && ISO_NAME="image.iso"
191
fi
192
0 commit comments