bash-tpl icon indicating copy to clipboard operation
bash-tpl copied to clipboard

a conditional .INCLUDE throws error when file does not exist

Open dkebler opened this issue 1 year ago • 4 comments

% if [[ -f  "$BUILD_SRC/Dockerfile" ]]; then
 .INCLUDE "$BUILD_SRC/Dockerfile"
% fi

if the file "$BUILD_SRC/Dockerfile" does not exist then the .INCLUDE statement is ignored BUT bash-tpl STILL seems to want to check that the .INCLUDE file exists thus throwing an error. This is unexpected.

File not found: '/data/Hacking/computing/docker/uci-docker-nextcloud/src/Dockerfile'
/dev/fd/63: line 142: syntax error near unexpected token `fi'
/dev/fd/63: line 142: `fi'

if "$BUILD_SRC/Dockerfile" exists it all works as expected.

dkebler avatar Jun 08 '23 22:06 dkebler