client: lib_env: fix handling of global command

This commit is contained in:
2025-08-12 10:32:12 -07:00
parent fd338b60f6
commit 38391e03c7

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -120,12 +120,10 @@ function lib_env::env()
lib_env::__write "$_env_file"
fi
else
[ -z "$global_command" ] && lib_utils::die_fatal
[ -z "$global_basename" ] && lib_utils::die_fatal
if [[ -z "$global_command" || "$global_command" != "gen" ]]; then
# shellcheck disable=SC2154
if [ "$global_command" != "gen" ]; then
lib_utils::die_fatal \
"Client environment not found! Run gen command'"
"Client environment not found! Run 'gen' command"
fi
lib_utils::print_info \