Skip to content

Commit

Permalink
rc-functions.sh: only delete env file if exists
Browse files Browse the repository at this point in the history
Signed-off-by: Anna (navi) Figueiredo Gomes <[email protected]>
  • Loading branch information
navi-desu committed Jun 26, 2023
1 parent e50436f commit ae9eb46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh/rc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ save_variables() {
local _envname

if [ -n "${export_vars}" ]; then
rm "${RC_SVCDIR}/env/${RC_SVCNAME}"
[ -e "${RC_SVCDIR}/env/${RC_SVCNAME}" ] && rm "${RC_SVCDIR}/env/${RC_SVCNAME}"
for _envname in ${export_vars}; do
eval echo "${_envname}=\$${_envname}" >> "${RC_SVCDIR}/env/${RC_SVCNAME}"
done
Expand Down

0 comments on commit ae9eb46

Please sign in to comment.