Skip to content

Commit 81cf978

Browse files
committed
Fix shellcheck issues
1 parent 931296a commit 81cf978

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Microsoft/scripts/gen_modules_vhdx.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22
set -ueo pipefail
33

4-
if [ $# -ne 2 ] || [ ! -d $1 ]; then
5-
printf "Usage ./$0 <modules dir> <output file>" 1>&2
4+
if [ $# -ne 2 ] || [ ! -d "$1" ]; then
5+
printf '%s' "Usage ./$0 <modules dir> <output file>" 1>&2
66
exit 1
77
fi
88

9-
if [ -e $2 ]; then
10-
printf "Refusing to overwrite existing file $2" 1>&2
9+
if [ -e "$2" ]; then
10+
printf '%s' "Refusing to overwrite existing file $2" 1>&2
1111
exit 2
1212
fi
1313

@@ -38,6 +38,6 @@ qemu-img convert -O vhdx "$tmp_dir/modules.img" "$2"
3838

3939
# Fix ownership since we're probably running under sudo
4040
if [ -n "$SUDO_USER" ]; then
41-
chown "$SUDO_USER:$SUDO_USER" $2
41+
chown "$SUDO_USER:$SUDO_USER" "$2"
4242
fi
4343

0 commit comments

Comments
 (0)