mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-10 03:13:14 -06:00
fix: don't overwrite src without permission
This commit is contained in:
parent
0aff00274e
commit
f5dd5142f6
1 changed files with 5 additions and 3 deletions
|
@ -52,7 +52,7 @@ from typing import (
|
|||
from urllib.error import HTTPError
|
||||
from urllib.request import urlopen
|
||||
|
||||
__version__ = "23.5a2-6-gd3f4bf9-dev"
|
||||
__version__ = "23.5a2-7-g0aff002-dev"
|
||||
|
||||
|
||||
class Config:
|
||||
|
@ -1048,10 +1048,12 @@ class Viv:
|
|||
make_executable(src)
|
||||
echo("symlinking cli")
|
||||
|
||||
if not cli.is_file():
|
||||
if cli.is_file() and confirm(
|
||||
f"Existing file at {cli}, would you like to overwrite it?"
|
||||
):
|
||||
cli.unlink(src)
|
||||
cli.symlink_to(src)
|
||||
else:
|
||||
cli.unlink()
|
||||
cli.symlink_to(src)
|
||||
|
||||
echo("Remember to include the following line in your shell rc file:")
|
||||
|
|
Loading…
Reference in a new issue