diff --git a/automation/include/balena-deploy.inc b/automation/include/balena-deploy.inc index d9bfb74de..32887be82 100644 --- a/automation/include/balena-deploy.inc +++ b/automation/include/balena-deploy.inc @@ -343,6 +343,7 @@ balena_deploy_block() { local _esr="${11}" local _discontinued local _api_env=$(balena_lib_environment) + local _image_bind [ -z "${_device_type}" ] && echo "Device type is required" && return _discontinued=$(balena_lib_get_dt_state "${_device_type}") @@ -354,6 +355,7 @@ balena_deploy_block() { [ -z "${_appName}" ] && echo "App name is required" && return if [ -f "${_image_path}" ]; then _image_path="$(readlink --canonicalize "${_image_path}")" + _image_bind="-v ${_image_path}:/host/appimage.docker" fi _esr=${_esr:-"${ESR}"} @@ -387,7 +389,7 @@ balena_deploy_block() { -e balenaCloudEmail="${_balenaCloudEmail}" \ -e balenaCloudPassword="${_balenaCloudPassword}" \ -e ESR="${_esr}" \ - -v "${_image_path}":/host/appimage.docker \ + ${_image_bind} \ -v "${device_dir}":/work \ -v "${_work_dir}":/deploy \ --privileged \