diff --git a/eden/fs/cli/config.py b/eden/fs/cli/config.py index 768c95ca30..8eddea30c2 100644 --- a/eden/fs/cli/config.py +++ b/eden/fs/cli/config.py @@ -171,12 +171,12 @@ class ListMountInfo(typing.NamedTuple): def to_json_dict(self) -> Dict[str, Any]: return { - "data_dir": str(self.data_dir), + "data_dir": self.data_dir.as_posix(), "state": MountState._VALUES_TO_NAMES.get(self.state) if self.state is not None else "NOT_RUNNING", "configured": self.configured, - "backing_repo": str(self.backing_repo) + "backing_repo": self.backing_repo.as_posix() if self.backing_repo is not None else None, } diff --git a/eden/fs/cli/main.py b/eden/fs/cli/main.py index 25794c22a6..b516439e78 100644 --- a/eden/fs/cli/main.py +++ b/eden/fs/cli/main.py @@ -608,7 +608,8 @@ class ListCmd(Subcmd): out: ui.Output, mount_points: Dict[Path, ListMountInfo] ) -> None: data = { - str(mount.path): mount.to_json_dict() for mount in mount_points.values() + mount.path.as_posix(): mount.to_json_dict() + for mount in mount_points.values() } json_str = json.dumps(data, sort_keys=True, indent=2) out.writeln(json_str) @@ -631,7 +632,7 @@ class ListCmd(Subcmd): state_name = MountState._VALUES_TO_NAMES[mount_info.state] state_str = f" ({state_name})" - out.writeln(f"{path}{state_str}{suffix}") + out.writeln(f"{path.as_posix()}{state_str}{suffix}") class RepoError(Exception):