Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-09-28 07:00:06 -0400
committerGitHub <noreply@github.com>2023-09-28 21:00:06 +1000
commit3695c37bc4c530cc381ccee86e3e190f50a4a416 (patch)
treea76f9b9a4ba90997f8e5fe6329d19a1a8327bdcc /archinstall/lib
parent1e296b263714017596beeca27744a51c75f29504 (diff)
Fix mount command whitespace (#2126)
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk/device_handler.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index 066d3295..f2835b7b 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -546,12 +546,16 @@ class DeviceHandler(object):
info(f'Device already mounted at {target_mountpoint}')
return
- str_options = ','.join(options)
- str_options = f'-o {str_options}' if str_options else ''
+ cmd = ['mount']
- mount_fs = f'-t {mount_fs}' if mount_fs else ''
+ if len(options):
+ cmd.extend(('-o', ','.join(options)))
+ if mount_fs:
+ cmd.extend(('-t', mount_fs))
- command = f'mount {mount_fs} {str_options} {dev_path} {target_mountpoint}'
+ cmd.extend((str(dev_path), str(target_mountpoint)))
+
+ command = ' '.join(cmd)
debug(f'Mounting {dev_path}: {command}')