fix(setup): Use resolve() before invoking as_uri() (#700)

If a relative file path is provided, `as_uri()` throws a ValueError.
Resolve the path to be absolute before converting to URI.
This commit is contained in:
Alex Pastel 2024-12-27 10:15:58 -07:00 • committed by GitHub
commit 4081404b56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,7 +75,7 @@ def parse_args(args):
def main() -> Union[RefreshingToken, str]:
args = parse_args(sys.argv[1:])
filename = args.file.as_posix() if args.file else f"{args.setup_type}.json"
print(f"Creating {Path(filename).as_uri()} with your authentication credentials...")
print(f"Creating {Path(filename).resolve().as_uri()} with your authentication credentials...")
if args.setup_type == "oauth":
if args.client_id is None:
args.client_id = input("Enter your Google Youtube Data API client ID: ")