From 6611268dfee59e07728a81fbf83b4607bee98901 Mon Sep 17 00:00:00 2001 From: Mentor Date: Sat, 24 Sep 2022 21:14:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20bash=20assignment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/battery.js | 2 +- app/package.json | 2 +- setup.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/modules/battery.js b/app/modules/battery.js index e2ad702..5771f76 100644 --- a/app/modules/battery.js +++ b/app/modules/battery.js @@ -80,7 +80,7 @@ const update_or_install_battery = async () => { // If not installed, run install script if( !is_installed ) { - log( `Installing battery for $USER...` ) + log( `Installing battery for ${ USER }...` ) await alert( `Welcome to the Battery limiting tool. The app needs to install some components, so it will ask for your password. This should only be needed once.` ) const result = await exec_sudo_async( `curl -s https://raw.githubusercontent.com/actuallymentor/battery/main/setup.sh | bash -s -- $USER` ) log( `Install result: `, result ) diff --git a/app/package.json b/app/package.json index 89162d9..f542306 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "battery", - "version": "1.0.0", + "version": "1.0.1", "description": "A battery charge limiter for M1 Mac devices", "main": "main.js", "build": { diff --git a/setup.sh b/setup.sh index 1380bec..4d79a6c 100644 --- a/setup.sh +++ b/setup.sh @@ -12,7 +12,7 @@ binfolder=/usr/local/bin mkdir -p $tempfolder # Set script value -calling_user=${1:="$USER"} +calling_user=${1:-"$USER"} # Ask for sudo once, in most systems this will cache the permissions for a bit sudo echo "🔋 Starting battery installation"