summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-28 18:37:33 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-28 18:37:33 +1100
commitf99dbde53a4297dfc9e72be78efec98d238bb18f (patch)
tree8c000ba5623c6edeb42e46a6e1baa0257e8ec776
parentfix perms (diff)
downloadcaelestia-cli-f99dbde53a4297dfc9e72be78efec98d238bb18f.tar.gz
caelestia-cli-f99dbde53a4297dfc9e72be78efec98d238bb18f.tar.bz2
caelestia-cli-f99dbde53a4297dfc9e72be78efec98d238bb18f.zip
fix scheme change when no dir
-rwxr-xr-xmain.fish5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.fish b/main.fish
index db517b7..e1ed05d 100755
--- a/main.fish
+++ b/main.fish
@@ -34,8 +34,11 @@ end
if test "$argv[1]" = scheme
set -l valid_schemes dynamic mocha macchiato frappe latte
if contains -- "$argv[2]" $valid_schemes
- echo -n $argv[2] > $CACHE/scheme/current.txt || error "Invalid scheme: $argv[2]"
+ mkdir -p $CACHE/scheme
+ echo -n $argv[2] > $CACHE/scheme/current.txt
test -f $CONFIG/gtk/update-scheme.fish && $CONFIG/gtk/update-scheme.fish
+ else
+ error "Invalid scheme: $argv[2]"
end
exit
end