Skip to content

Commit

Permalink
fix: 🐛 healthcheck user home take into account dash usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Oct 19, 2023
1 parent 7a66c88 commit daa30b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/healthcheck
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ warningCount=0
echo
fi

homeUsernamePaths=$(grep -oE '/home\/(\w+)' "$defaultLightningConfigPath" | cut -d / -f 3)
homeUsernamePaths=$(grep -oE '/home\/([a-zA-Z0-9_\-]+)' ./test | cut -d / -f 3)
for username in $homeUsernamePaths; do
if [[ "$username" != $(whoami) ]] && grep -q "/home/$username" "$defaultLightningConfigPath"; then
echo "⚠️ WARNING: The configuration contains a path for user /home/$username that doesn't match current user's home $basePath. If there isn't a reason for this mismatch, update the file manually."
Expand Down

0 comments on commit daa30b0

Please sign in to comment.