Fix bug with --no-confirm

This commit is contained in:
Ben Visness 2023-07-29 15:22:03 -05:00
parent 956ad51072
commit 9a2c4d8876
1 changed files with 13 additions and 13 deletions

View File

@ -546,9 +546,9 @@ def yeet(path):
def install(args): def install(args):
if not args.no_confirm: dest = os.path.expanduser(os.path.join("~", ".orca"))
dest = os.path.expanduser(os.path.join("~", ".orca"))
if not args.no_confirm:
print("The Orca command-line tools will be installed to your home directory in:") print("The Orca command-line tools will be installed to your home directory in:")
print(dest) print(dest)
print() print()
@ -561,15 +561,15 @@ def install(args):
else: else:
print("Please enter \"yes\" or \"no\" and press return.") print("Please enter \"yes\" or \"no\" and press return.")
bin_dir = os.path.join(dest, "bin") bin_dir = os.path.join(dest, "bin")
yeet(bin_dir) yeet(bin_dir)
shutil.copytree("scripts", os.path.join(bin_dir, "sys_scripts")) shutil.copytree("scripts", os.path.join(bin_dir, "sys_scripts"))
shutil.copy("orca", bin_dir) shutil.copy("orca", bin_dir)
# TODO: Customize these instructions for Windows # TODO: Customize these instructions for Windows
print() print()
print("Orca has been installed. Make sure the Orca tools are on your PATH by adding the") print("The Orca tools have been installed. Make sure the Orca tools are on your PATH by")
print("following to your shell config:") print("adding the following to your shell config:")
print() print()
print(f"export PATH=\"{bin_dir}:$PATH\"") print(f"export PATH=\"{bin_dir}:$PATH\"")
print() print()