Fix 2 bugs. Deleting file without yaml file and multi-word delete

The first bug output an error if trying to stage the deletion of the
yaml file if the file never existed. The error is now piped to /dev/null
and `|| true` is appended to the line which causes the script to carry
on execution

The second change is when deleting a file, you no longer have to quote
the file name if it is a multi word file. This puts it in line with the
new command
This commit is contained in:
Jonathan Hodgson 2020-12-30 19:21:31 +00:00
parent 9a269628c4
commit 05e5cac976
2 changed files with 2 additions and 2 deletions

2
kb
View file

@ -256,7 +256,7 @@ gitChange(){
else
# if we get here, the file has been deleted
git add "$filename"
git add "$filename.yaml"
git add "$filename.yaml" 2> /dev/null || true
git commit -m "KB auto-commit: delete: $filename"
fi
fi