mirror of
https://salsa.debian.org/raspi-team/image-specs
synced 2026-05-30 06:38:09 +02:00
Fix shellcheck issue SC2154
SC2154: var is referenced but not assigned.
The 'rootmnt' variable is set in /usr/share/initramfs-tools/init and if
it's not available, that would be bad.
According to SC2154 you can fix that issue by using '${var:?}' so it
would fail if unset or empty.
So apply that and reference that SC item in the comments.
Also remove it from the exclude list in the CI config file.
This commit is contained in:
@@ -33,8 +33,8 @@ fi
|
||||
|
||||
log_begin_msg "$0 resizing $ROOT"
|
||||
|
||||
# Unmount for safety
|
||||
umount "${rootmnt}"
|
||||
# Unmount for safety; fail if unset or empty (shellcheck SC2154)
|
||||
umount "${rootmnt:?}"
|
||||
|
||||
# Expand the partition size to fill the entire device
|
||||
parted -s $rootdev resizepart $rootpart_nr 100%
|
||||
|
||||
Reference in New Issue
Block a user