Skip to content

Commit 5cb3dfa

Browse files
authored
Update Shell.py
1 parent 8fb5027 commit 5cb3dfa

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/cloudmesh/common/Shell.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff 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__)

0 commit comments

Comments
 (0)