Skip to content

Commit

Permalink
Merge pull request #259 from pratnala/patch-1
Browse files Browse the repository at this point in the history
Change how Wi-Fi network info is received on Mac
  • Loading branch information
ethancedwards8 authored Apr 10, 2024
2 parents 787e9cd + df75ea2 commit c2b1d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ get_ssid()
;;

Darwin)
if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
if networksetup -getairportnetwork en0 | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
echo "$(networksetup -getairportnetwork en0 | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
else
echo 'Ethernet'
fi
Expand Down

0 comments on commit c2b1d67

Please sign in to comment.