Skip to content

Commit

Permalink
Remove empty lines from the current_state file after redirecting the …
Browse files Browse the repository at this point in the history
…update_available var value to it

When there are no update available, redirecting the value of the update_available var (which is then empty) to the file produces an empty (but existing) line.
This commit aims to remove it so the file is actually empty (instead of containing an empty/blank line).
  • Loading branch information
Antiz96 committed Nov 24, 2023
1 parent f54ffb6 commit ef064ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ check() {
fi

echo "${update_available}" > "${statedir}/current_check"
sed -i '/^\s*$/d' "${statedir}/current_check"
fi

if [ -n "${update_available}" ]; then
Expand Down

0 comments on commit ef064ee

Please sign in to comment.