Skip to content

Commit

Permalink
Fix unbound variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jan 1, 2020
1 parent 94c020c commit 9f91aee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ run() {
local dockerfile="Dockerfile.${1}"
local image_name="rustembedded/cross:${1}"

local cache_from_args=()

if docker pull "${image_name}"; then
local cache_from_args=(--cache-from "${image_name}")
cache_from_args=(--cache-from "${image_name}")
fi

docker build ${cache_from_args[@]} --pull -t "${image_name}" -f "${dockerfile}" .
Expand Down

0 comments on commit 9f91aee

Please sign in to comment.