Skip to content

Commit

Permalink
Create the file if it doesn't exist. Fixes #116
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Oct 9, 2024
1 parent c5158fe commit 4cbc60f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,11 @@ line_in_file() {

# Process each file
for file in "${files[@]}"; do
# Create the file if it doesn't exist
if [[ ! -f "$file" ]]; then
touch "$file"
fi

case $action in
ensure)
for line in "${args[@]}"; do
Expand Down

0 comments on commit 4cbc60f

Please sign in to comment.