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:
parent
0042e7d108
commit
4081404b56
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ def parse_args(args):
|
||||||
def main() -> Union[RefreshingToken, str]:
|
def main() -> Union[RefreshingToken, str]:
|
||||||
args = parse_args(sys.argv[1:])
|
args = parse_args(sys.argv[1:])
|
||||||
filename = args.file.as_posix() if args.file else f"{args.setup_type}.json"
|
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.setup_type == "oauth":
|
||||||
if args.client_id is None:
|
if args.client_id is None:
|
||||||
args.client_id = input("Enter your Google Youtube Data API client ID: ")
|
args.client_id = input("Enter your Google Youtube Data API client ID: ")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue