Create flag to disable globbing

This commit is contained in:
Stefan Zweifel 2021-04-10 17:10:27 +02:00
parent f4f9aedbee
commit be370eccae
3 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,9 @@ inputs:
description: Skip the call to git-fetch.
required: false
default: false
disable_globbing:
description: Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html)
default: false
outputs:
changes_detected:

View File

@ -1,7 +1,10 @@
#!/bin/bash
set -eu
if "$INPUT_DISABLE_GLOBBING"; then
set -o noglob;
fi
_main() {
_switch_to_repository

View File

@ -22,6 +22,7 @@ setup() {
export INPUT_PUSH_OPTIONS=""
export INPUT_SKIP_DIRTY_CHECK=false
export INPUT_SKIP_FETCH=false
export INPUT_DISABLE_GLOBBING=false
# Configure Git
if [[ -z $(git config user.name) ]]; then
@ -422,6 +423,7 @@ git_auto_commit() {
# ---
INPUT_FILE_PATTERN="*.py"
INPUT_DISABLE_GLOBBING=true
run git_auto_commit