Compare commits

..

3 commits

View file

@ -52,7 +52,7 @@ from typing import (
from urllib.error import HTTPError from urllib.error import HTTPError
from urllib.request import urlopen from urllib.request import urlopen
__version__ = "23.5a2-5-g4e6acac-dev" __version__ = "23.5a2-8-gf5dd514-dev"
class Config: class Config:
@ -1048,16 +1048,18 @@ class Viv:
make_executable(src) make_executable(src)
echo("symlinking cli") echo("symlinking cli")
if not cli.is_file(): if cli.is_file() and confirm(
f"Existing file at {a.style(cli,'bold')}, would you like to overwrite it?"
):
cli.unlink(src)
cli.symlink_to(src) cli.symlink_to(src)
else: else:
cli.unlink()
cli.symlink_to(src) cli.symlink_to(src)
echo("Remember to include the following line in your shell rc file:") echo("Remember to include the following line in your shell rc file:")
sys.stderr.write( sys.stderr.write(
' export PYTHONPATH="$PYTHONPATH:$HOME/' ' export PYTHONPATH="$PYTHONPATH:$HOME/'
f'{src.relative_to(Path.home())}"\n' f'{src.relative_to(Path.home()).parent}"\n'
) )
def manage(self, args: Namespace) -> None: def manage(self, args: Namespace) -> None: