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 23, 2023
1 parent a4a134e commit ee11284
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 ee11284

Please sign in to comment.