Skip to content

Commit

Permalink
quote cqfd/dockerfile accesses
Browse files Browse the repository at this point in the history
Add missing quotes around file paths to ensure they're still accessible
when their path contains spaces.
  • Loading branch information
joufellasfl committed Mar 13, 2023
1 parent 3e04f1d commit 0e4ffb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cqfd
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ parse_ini_config_file() {
die "Can't find $1 - create it or pick one using 'cqfd -f'"
fi

ini="$(<$1)" # read the file
ini="$(<"$1")" # read the file
ini="${ini//[/\\[}" # escape [
ini="${ini//]/\\]}" # escape ]
IFS=$'\n' && ini=( ${ini} ) # convert to line-array
Expand Down Expand Up @@ -398,7 +398,7 @@ config_load() {

# This will look like cqfd_USER_ORG_NAME_HASH
local format_user=$(echo $USER | sed 's/[^0-9a-zA-Z\-]/_/g')
local dockerfile_hash=$(sha256sum $dockerfile | cut -b 1-7)
local dockerfile_hash=$(sha256sum "$dockerfile" | cut -b 1-7)
docker_img_name="cqfd${format_user:+_${format_user}}_${project_org}_${project_name}_${dockerfile_hash}"

# Adapt things for a specific container
Expand Down

0 comments on commit 0e4ffb6

Please sign in to comment.