Don't error if the file doesn't exist

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
latency
Tyler Nijmeh 4 years ago
parent 27589bc9d2
commit 1fa3270d7a

@ -14,11 +14,7 @@ dbg() {
# Safely write value to file
_write() {
# Bail out if file does not exist
if [[ ! -f "$1" ]]
then
err "File $1 does not exist. Skipping."
return 1
fi
[[ ! -f "$1" ]] && return 1
# Fetch the current key value
local curval=`cat "$1" 2> /dev/null`

Loading…
Cancel
Save