@@ -42,7 +42,7 @@ def _setup_tmp_disk_image(self) -> None:
4242 logging .info (self .trans ["Creating payloads directory" ])
4343 Path (self .temp_dir .name / Path ("payloads" )).mkdir (parents = True , exist_ok = True )
4444 self ._unmount_active_dmgs (unmount_all_active = False )
45- output = subprocess . run (
45+ output = subprocess_wrapper . run_as_root (
4646 [
4747 "/usr/bin/hdiutil" , "attach" , "-noverify" , f"{ self .constants .payload_path_dmg } " ,
4848 "-mountpoint" , Path (self .temp_dir .name / Path ("payloads" )),
@@ -86,13 +86,13 @@ def _unmount_active_dmgs(self, unmount_all_active: bool = True) -> None:
8686 if "shadow-path" in image :
8787 if self .temp_dir .name in image ["shadow-path" ]:
8888 logging .info (self .trans ["Unmounting personal {0}" ].format (variant ))
89- subprocess . run (
89+ subprocess_wrapper . run_as_root (
9090 ["/usr/bin/hdiutil" , "detach" , image ["system-entities" ][0 ]["dev-entry" ], "-force" ],
9191 stdout = subprocess .PIPE , stderr = subprocess .STDOUT
9292 )
9393 else :
9494 logging .info (f"Unmounting { variant } at: { image ['system-entities' ][0 ]['dev-entry' ]} " )
95- subprocess . run (
95+ subprocess_wrapper . run_as_root (
9696 ["/usr/bin/hdiutil" , "detach" , image ["system-entities" ][0 ]["dev-entry" ], "-force" ],
9797 stdout = subprocess .PIPE , stderr = subprocess .STDOUT
9898 )
0 commit comments