Ignore configs that don't exist

This commit is contained in:
Jakob Lechner 2024-02-04 17:00:35 +00:00
parent 44b6af06b9
commit f18126b6af

View file

@ -89,7 +89,10 @@ let
'dark': entry['dark'],
}[scheme]
os.symlink(src, target)
try:
os.symlink(src, target)
except FileNotFoundError:
pass
if entry.get('exec') is not None:
command, *args = entry["exec"]
@ -102,10 +105,13 @@ let
for arg in args
]
print(command, *args)
subprocess.run(
(command, *args),
cwd=directory
)
try:
subprocess.run(
(command, *args),
cwd=directory
)
except FileNotFoundError:
pass
if __name__ == '__main__':