mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-11-19 23:36:40 +01:00
Fix dope.sh handling of empty lines in deletions file (#536)
This commit is contained in:
@@ -149,9 +149,18 @@ recreate_derived_dir() {
|
|||||||
# TODO: also allow deletion of dirs.
|
# TODO: also allow deletion of dirs.
|
||||||
if [ -f "${DIFF_DIR_DELETIONS}" ]; then
|
if [ -f "${DIFF_DIR_DELETIONS}" ]; then
|
||||||
while IFS= read -r filepath; do
|
while IFS= read -r filepath; do
|
||||||
|
# Skip empty lines
|
||||||
|
[[ -z "$filepath" ]] && continue
|
||||||
|
|
||||||
local derived_dir_filepath
|
local derived_dir_filepath
|
||||||
local rm_exit_code
|
local rm_exit_code
|
||||||
derived_dir_filepath="${DERIVED_DIR}/${filepath}"
|
derived_dir_filepath="${DERIVED_DIR}/${filepath}"
|
||||||
|
|
||||||
|
# Only delete if it exists and is a file
|
||||||
|
if [[ ! -f "$derived_dir_filepath" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
rm "${derived_dir_filepath}"
|
rm "${derived_dir_filepath}"
|
||||||
rm_exit_code=$?
|
rm_exit_code=$?
|
||||||
if [ ${rm_exit_code} -eq 0 ]; then
|
if [ ${rm_exit_code} -eq 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user