diff --git a/nix/validate.nix b/nix/validate.nix index 464fd1e..e433806 100644 --- a/nix/validate.nix +++ b/nix/validate.nix @@ -12,7 +12,9 @@ writeShellApplication { ]; text = '' shopt -s globstar - find "''${PACKER_CONFIG_DIR}" -name '*_linux_amd64' -exec chmod +x '{}' ";" + if [ -e "''${PACKER_CONFIG_DIR}" ]; then + find "''${PACKER_CONFIG_DIR}" -name '*_linux_amd64' -exec chmod +x '{}' ";" + fi packer init sources for vars in distros/**/*.pkrvars.hcl; do packer validate -except=upload "-var-file=''${vars}" sources/