Skip to content

Commit aa9ec2a

Browse files
Copilotneilime
andcommitted
fix(test): improve gpgconf.ctl location detection and cleanup
Co-authored-by: neilime <[email protected]>
1 parent d248c7f commit aa9ec2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

actions/test/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,18 @@ runs:
151151
shell: bash
152152
run: |
153153
# Find and remove the malformed gpgconf.ctl file that contains unexpanded shell variables
154+
# The pkgxdev gnupg installs gpgconf.ctl next to the gpgconf binary
154155
if command -v gpgconf >/dev/null 2>&1; then
155-
gpgconf_ctl=$(dirname "$(which gpgconf)")/gpgconf.ctl
156+
gpgconf_bin=$(command -v gpgconf)
157+
gpgconf_ctl="$(dirname "$gpgconf_bin")/gpgconf.ctl"
156158
if [ -f "$gpgconf_ctl" ]; then
157159
echo "Removing malformed gpgconf.ctl: $gpgconf_ctl"
158160
rm -f "$gpgconf_ctl"
159161
fi
160162
fi
161163
# Ensure GNUPGHOME is set up correctly
162-
if [ -n "$HOME" ]; then
163-
mkdir -p "$HOME/.gnupg"
164-
chmod 700 "$HOME/.gnupg"
165-
fi
164+
mkdir -p "$HOME/.gnupg"
165+
chmod 700 "$HOME/.gnupg"
166166
167167
- name: 📊 Upload coverage to Codecov
168168
if: always() && inputs.coverage == 'codecov'

0 commit comments

Comments
 (0)