[go: up one dir, main page]

Skip to content

Allow using directories (folders) with rules:exists

Proposal

Currently, rules:exists do not allow for using directories, only files. The documentation does accurately state this, but doing if [ -f "${_path:-}" ] could be either if [ -e "${_path:-}" ] or if [ -f "${_path:-}" ] || [ -d "${_path:-}" ] (or whatever ruby/go language this check is being done :p would be very helpful.

So I propose to expand 'exists' to also work on directories (empty or not) not just files.

A demo repository can be seen here: https://gitlab.com/olliver/sandbox/gitlab_tests/-/tree/rules_and_exists

Edited by 🤖 GitLab Bot 🤖