From a4378c2bb30752440922e94e70e2e12bf739e1fd Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 10 Nov 2025 21:25:14 -0700 Subject: [PATCH] Use for loop and `.` to keep functions in current shell. --- tasks/general/acct_mgmt/users.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 4741f9f..4d69484 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -1019,8 +1019,10 @@ alias hugo-server-prod="hugo server --gc --minify" alias hugo-server="hugo-server-dev" global_functions: | - ls "{{ global_bin }}/"*".function" | while read global_function; do - source "$global_function" + for global_function in "{{ global_bin }}/"*".function"; do + if [[ -f "$global_function" ]]; then + . "$global_function" + fi done - name: General | Account Management | Users | Files | Common Variable