propagate options when mounting a partition

This commit is contained in:
Charles Vandevoorde 2021-05-15 20:43:47 +02:00
parent 85fa833a8a
commit d61801011c
1 changed files with 4 additions and 1 deletions

View File

@ -384,7 +384,10 @@ class Partition():
pathlib.Path(target).mkdir(parents=True, exist_ok=True)
try:
sys_command(f'/usr/bin/mount {self.path} {target}')
if options:
sys_command(f'/usr/bin/mount -o {options} {self.path} {target}')
else:
sys_command(f'/usr/bin/mount {self.path} {target}')
except SysCallError as err:
raise err