From 3461019ee18f4a8cc5fc6d51c04fb2b3eb9c56f3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 7 Jul 2022 03:07:37 -0400 Subject: [PATCH] fix: ensure we respect the file path for service links --- common-functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common-functions b/common-functions index 38648bb..3e20300 100755 --- a/common-functions +++ b/common-functions @@ -235,13 +235,15 @@ service_alternative_alias() { service_app_links() { declare desc="output all service links for a given app" declare APP="$1" - local SERVICE LINKED_APP + local LINKED_APP SERVICE SERVICE_ROOT pushd "$PLUGIN_DATA_ROOT" >/dev/null for SERVICE in $(fn-services-list); do [[ -n "$SERVICE" ]] || continue - [[ -f "$SERVICE/LINKS" ]] || continue - for LINKED_APP in $(<"$SERVICE/LINKS"); do + + SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" + [[ -f "$SERVICE_ROOT/LINKS" ]] || continue + for LINKED_APP in $(<"$SERVICE_ROOT/LINKS"); do if [[ "$LINKED_APP" == "$APP" ]]; then echo "$SERVICE" fi