Skip to content

Commit cfd2e97

Browse files
🔥 increase visudo verbosity, decreease visudo verbosity
1 parent 6bfcd48 commit cfd2e97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

battery.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Update management
55
## variables are used by this binary as well at the update script
66
## ###############
7-
BATTERY_CLI_VERSION="v1.1.3"
7+
BATTERY_CLI_VERSION="v1.1.4"
88

99
# Path fixes for unexpected environments
1010
PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/opt/homebrew
@@ -127,7 +127,7 @@ function change_magsafe_led_color() {
127127
color=$1
128128

129129
# Check whether user can run color changes without password (required for backwards compatibility)
130-
if sudo -n smc -k ACLC -r; then
130+
if sudo -n smc -k ACLC -r &>/dev/null; then
131131
log "💡 Setting magsafe color to $color"
132132
else
133133
log "🚨 Your version of battery is using an old visudo file"
@@ -260,6 +260,8 @@ if [[ "$action" == "visudo" ]]; then
260260
# Set correct permissions on visudo file
261261
sudo chmod 440 $visudo_file
262262

263+
echo "Visudo file updated successfully"
264+
263265
else
264266
echo "Error validating visudo file, this should never happen:"
265267
sudo visudo -c -f $visudo_tmpfile

0 commit comments

Comments
 (0)