Skip to content

Commit 9ef71c7

Browse files
authored
Merge pull request #72 from thaJeztah/fix_vendor_macos
base: fix xx-info failing on macOS
2 parents 3bceb46 + eac387d commit 9ef71c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

base/xx-info

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ if [ -n "$TARGETPLATFORM" ]; then
9999
fi
100100

101101
# detect distro vendor
102-
# shellcheck disable=SC1091
103-
if . /etc/os-release 2>/dev/null; then
104-
XX_VENDOR=$ID
105-
fi
106-
107102
if [ "$TARGETOS" = "darwin" ]; then
108103
XX_VENDOR="apple"
104+
elif [ -f /etc/os-release ]; then
105+
# shellcheck disable=SC1091
106+
if . /etc/os-release 2>/dev/null; then
107+
XX_VENDOR=$ID
108+
fi
109109
fi
110110

111111
vendor=""
@@ -328,7 +328,7 @@ case "$1" in
328328
echo $XX_TRIPLE
329329
;;
330330
"vendor")
331-
echo $XX_VENDOR
331+
echo "$XX_VENDOR"
332332
;;
333333
"libc") # this is not abi, just the prefix
334334
echo $XX_LIBC

0 commit comments

Comments
 (0)