Only return state when we are toggling

Otherwise we know it!
This commit is contained in:
David Heinemeier Hansson
2026-05-10 15:08:33 +02:00
parent 0075645f0e
commit 5346bc6db1
+2 -2
View File
@@ -12,7 +12,6 @@ on() {
if [[ -f $FLAG_SOURCE ]]; then
mkdir -p "$(dirname "$FLAG")"
cp "$FLAG_SOURCE" "$FLAG"
echo "on"
else
echo "Flag not found: $FLAG_NAME"
exit 1
@@ -21,14 +20,15 @@ on() {
off() {
rm -f "$FLAG"
echo "off"
}
toggle() {
if [[ -f $FLAG ]]; then
off
echo "off"
else
on
echo "on"
fi
}