Skip to content

Commit ebd16df

Browse files
committed
[REVIEW] Only bind mount image if presetn
1 parent 6882508 commit ebd16df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

automation/include/balena-deploy.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ balena_deploy_block() {
343343
local _esr="${11}"
344344
local _discontinued
345345
local _api_env=$(balena_lib_environment)
346+
local _image_bind
346347

347348
[ -z "${_device_type}" ] && echo "Device type is required" && return
348349
_discontinued=$(balena_lib_get_dt_state "${_device_type}")
@@ -354,6 +355,7 @@ balena_deploy_block() {
354355
[ -z "${_appName}" ] && echo "App name is required" && return
355356
if [ -f "${_image_path}" ]; then
356357
_image_path="$(readlink --canonicalize "${_image_path}")"
358+
_image_bind="-v ${_image_path}:/host/appimage.docker"
357359
fi
358360
_esr=${_esr:-"${ESR}"}
359361

@@ -387,7 +389,7 @@ balena_deploy_block() {
387389
-e balenaCloudEmail="${_balenaCloudEmail}" \
388390
-e balenaCloudPassword="${_balenaCloudPassword}" \
389391
-e ESR="${_esr}" \
390-
-v "${_image_path}":/host/appimage.docker \
392+
${_image_bind} \
391393
-v "${device_dir}":/work \
392394
-v "${_work_dir}":/deploy \
393395
--privileged \

0 commit comments

Comments
 (0)