Skip to content

Commit 0e4ffb6

Browse files
committed
quote cqfd/dockerfile accesses
Add missing quotes around file paths to ensure they're still accessible when their path contains spaces.
1 parent 3e04f1d commit 0e4ffb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cqfd

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ parse_ini_config_file() {
7878
die "Can't find $1 - create it or pick one using 'cqfd -f'"
7979
fi
8080

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

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

404404
# Adapt things for a specific container

0 commit comments

Comments
 (0)