diff --git a/livesync/livesync.py b/livesync/livesync.py index 2c9ab63..2541c09 100755 --- a/livesync/livesync.py +++ b/livesync/livesync.py @@ -1,11 +1,12 @@ #!/usr/bin/env python3 import argparse import asyncio -import json import sys from pathlib import Path from typing import List +import pyjson5 + from livesync import Folder, Mutex, Target @@ -29,7 +30,7 @@ async def async_main() -> None: folders: List[Folder] = [] if source.is_file(): - workspace = json.loads(source.read_text()) + workspace = pyjson5.decode(source.read_text()) paths = [Path(f['path']) for f in workspace['folders']] folders = [Folder(p, target) for p in paths if p.is_dir()] else: diff --git a/requirements.txt b/requirements.txt index 2bd9cfd..03334cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ +pathspec +pyjson5 watchfiles -pathspec \ No newline at end of file