Skip to content

Commit a9e3ffa

Browse files
authored
fix: Remove non-printable characters (#1160)
1 parent 77a8e4d commit a9e3ffa

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG VERSION_ARG="latest"
22
FROM scratch AS build-amd64
33

4-
COPY --from=qemux/qemu:7.04 / /
4+
COPY --from=qemux/qemu:7.05 / /
55

66
ARG DEBCONF_NOWARNINGS="yes"
77
ARG DEBIAN_FRONTEND="noninteractive"

src/install.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ skipInstall() {
1616

1717
if [ -f "$previous" ]; then
1818
previous=$(<"$previous")
19+
previous="${previous//[![:print:]]/}"
1920
if [ -n "$previous" ]; then
2021
previous="$STORAGE/$previous"
2122
if [[ "${previous,,}" != "${iso,,}" ]]; then
@@ -1014,19 +1015,27 @@ bootWindows() {
10141015

10151016
if [ -f "$STORAGE/windows.args" ]; then
10161017
ARGS=$(<"$STORAGE/windows.args")
1018+
ARGS="${ARGS//[![:print:]]/}"
10171019
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
10181020
fi
10191021

10201022
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
1021-
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type")
1023+
if [ -z "${DISK_TYPE:-}" ]; then
1024+
DISK_TYPE=$(<"$STORAGE/windows.type")
1025+
DISK_TYPE="${DISK_TYPE//[![:print:]]/}"
1026+
fi
10221027
fi
10231028

10241029
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
10251030
BOOT_MODE=$(<"$STORAGE/windows.mode")
1031+
BOOT_MODE="${BOOT_MODE//[![:print:]]/}"
10261032
fi
10271033

10281034
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
1029-
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
1035+
if [[ "${PLATFORM,,}" == "x64" ]]; then
1036+
MACHINE=$(<"$STORAGE/windows.old")
1037+
MACHINE="${MACHINE//[![:print:]]/}"
1038+
fi
10301039
fi
10311040

10321041
return 0

src/mido.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ download_windows() {
9393

9494
# uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs
9595
session_id=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)
96+
session_id="${session_id//[![:print:]]/}"
9697

9798
# Get product edition ID for latest release of given Windows version
9899
# Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number

0 commit comments

Comments
 (0)