File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,24 +613,6 @@ def install_chocolatey():
613613 if not pyuac .isUserAdmin ():
614614 Console .error ("Please run the terminal as administrator." )
615615 return False
616-
617- # is this a good idea?
618- #see if chocolatey exists.
619- programdata = os .environ .get ("ProgramData" , r"C:\ProgramData" )
620- target = os .path .join (programdata , "chocolatey" )
621- # Safety guard: only allow deletes inside ProgramData
622- pd_abs = os .path .abspath (programdata )
623- tgt_abs = os .path .abspath (target )
624- if not tgt_abs .lower ().startswith (pd_abs .lower ()):
625- sys .exit ("Refusing to delete a path outside ProgramData." )
626- if os .path .isdir (target ):
627- if yn_choice ("Chocolatey seems to exist already! Delete it?" ):
628- shutil .rmtree (tgt_abs )
629- else :
630- sys .exit ("Not deleting chocolatey because the user said not to." )
631- #
632- #
633- #
634616
635617 # Get the full path of the current Python script
636618 current_script_path = os .path .abspath (__file__ )
You can’t perform that action at this time.
0 commit comments