diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-06-23 14:02:21 -0300 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-10-19 10:56:54 +0200 |
commit | a695e4d4f61afb91701efc6eaf08ca44eb230be9 (patch) | |
tree | a9e77903a34b28836a774273704ab9c551f81ca8 /sh | |
parent | e65da5598722160418b6faf772ea82ebd1eab7ed (diff) |
rc-functions.sh: only delete env file if exists
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'sh')
-rw-r--r-- | sh/rc-functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/rc-functions.sh b/sh/rc-functions.sh index 922bb870..2a60eaf8 100644 --- a/sh/rc-functions.sh +++ b/sh/rc-functions.sh @@ -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 |