Skip to content

Commit 612e9a8

Browse files
committed
fix dict
1 parent d0047bc commit 612e9a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

oclp_r/sys_patch/sys_patch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def _merge_kdk_with_root(self, save_hid_cs: bool = False) -> None:
181181
).merge(save_hid_cs)
182182
def clean_launchpad(self) -> None:
183183
logging.info("- Cleaning LaunchPad Settings")
184-
subprocess.run(["mkdir", "-p", "/Library/Preferences/FeatureFlags/Domain"],capture_output=True,text=True)
185-
subprocess.run(["defaults", "write", "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist", "SpotlightPlus", "-dict", "Enabled", "-bool", "false"],capture_output=True,text=True)
184+
subprocess.run("mkdir -p /Library/Preferences/FeatureFlags/Domain",capture_output=True,text=True,shell=True)
185+
subprocess.run("defaults write /Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist SpotlightPlus -dict Enabled -bool true",capture_output=True,text=True,shell=True)
186186
def _unpatch_root_vol(self):
187187
"""
188188
Reverts APFS snapshot and cleans up any changes made to the root and data volume
@@ -559,12 +559,12 @@ def start_patch(self):
559559
return
560560
if self.constants.change_launchpad is True:
561561
logging.info("- LaunchPad patching enabled, run command......")
562-
subprocess.run(["mkdir", "-p", "/Library/Preferences/FeatureFlags/Domain"],capture_output=True,text=True)
563-
subprocess.run(["defaults", "write", "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist", "SpotlightPlus", "-dict", "Enabled", "-bool", "false"])
562+
subprocess.run("mkdir -p /Library/Preferences/FeatureFlags/Domain",capture_output=True,text=True,shell=True)
563+
subprocess.run("defaults write /Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist SpotlightPlus -dict Enabled -bool false",capture_output=True,text=True,shell=True)
564564
else:
565565
logging.info("- LaunchPad patching disabled,skip......")
566-
subprocess.run(["mkdir", "-p", "/Library/Preferences/FeatureFlags/Domain"],capture_output=True,text=True)
567-
subprocess.run(["defaults", "write", "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist", "SpotlightPlus", "-dict", "Enabled", "-bool", "true"])
566+
subprocess.run("mkdir -p /Library/Preferences/FeatureFlags/Domain",capture_output=True,text=True,shell=True)
567+
subprocess.run("defaults write /Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist SpotlightPlus -dict Enabled -bool true",capture_output=True,text=True,shell=True)
568568
logging.info("- Verifying whether Root Patching possible")
569569
if patchset_obj.can_patch is False:
570570
logging.error("- Cannot continue with patching!!!")

0 commit comments

Comments
 (0)