Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ci/run
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ if [ -n "${CI-}" ]; then
*)
# must be linux?
# necessary for dbus-python
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 apt-get install --yes libdbus-1-dev libglib2.0-dev
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 apt update
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=1 apt install --yes libdbus-1-dev libglib2.0-dev
;;
esac
fi
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typecheck = [
{ include-group = "testing" },
"mypy",
"lxml", # for mypy html coverage
"ty>=0.0.1a34",
"ty>=0.0.3",

"types-tabulate",
]
Expand Down
21 changes: 11 additions & 10 deletions src/dron/launchd.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,18 @@ def plist(
) -> str:
# TODO hmm, kinda mirrors 'escape' method, not sure
cmd: Sequence[str]
if isinstance(command, (list, tuple)):
cmd = tuple(map(str, command))
elif isinstance(command, Path):
if isinstance(command, Path):
cmd = [str(command)]
elif isinstance(command, str) and ' ' not in command:
cmd = [command]
else:
# unquoting and splitting is way trickier than quoting and joining...
# not sure how to implement it p
# maybe we just want bash -c in this case, dunno how to implement properly
raise RuntimeError(command)
elif isinstance(command, str):
if ' ' not in command:
cmd = [command]
else:
# unquoting and splitting is way trickier than quoting and joining...
# not sure how to implement it p
# maybe we just want bash -c in this case, dunno how to implement properly
raise RuntimeError(command) # too ambiguous?
else: # must be an actual sequence of path-like things
cmd = tuple(map(str, command)) # ty: ignore[invalid-argument-type] # see https://github.com/astral-sh/ty/issues/2087
del command

mschedule = ''
Expand Down