Ask for symlink overwrite, add pacman -Syu at OS determination
This commit is contained in:
parent
81a7c0d39c
commit
07a694bbf4
1 changed files with 11 additions and 2 deletions
13
install.py
13
install.py
|
@ -234,8 +234,11 @@ class Installer:
|
||||||
p_dest.parent.makedirs_p()
|
p_dest.parent.makedirs_p()
|
||||||
|
|
||||||
if p_dest.exists() and not self.force:
|
if p_dest.exists() and not self.force:
|
||||||
ui.info_2("Skipping", pretty_dest)
|
if not ui.ask_yes_no(f"{pretty_dest} already exists. Overwrite?"):
|
||||||
return
|
ui.info_2("Skipping", pretty_dest)
|
||||||
|
return
|
||||||
|
ui.info_2("Deleting", pretty_dest)
|
||||||
|
p_dest.remove()
|
||||||
|
|
||||||
if p_dest.islink():
|
if p_dest.islink():
|
||||||
p_dest.remove()
|
p_dest.remove()
|
||||||
|
@ -333,6 +336,12 @@ def define_os() -> str:
|
||||||
ui.info_3("Found", operating_system)
|
ui.info_3("Found", operating_system)
|
||||||
|
|
||||||
if operating_system in ("arch", "manjaro"):
|
if operating_system in ("arch", "manjaro"):
|
||||||
|
subprocess.run(
|
||||||
|
"sudo pacman -Syu",
|
||||||
|
check=True,
|
||||||
|
shell=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
)
|
||||||
return "arch based"
|
return "arch based"
|
||||||
|
|
||||||
if operating_system in ("debian", "ubuntu"):
|
if operating_system in ("debian", "ubuntu"):
|
||||||
|
|
Loading…
Add table
Reference in a new issue