@@ -22,6 +22,7 @@ setup() {
2222 export INPUT_PUSH_OPTIONS=" "
2323 export INPUT_SKIP_DIRTY_CHECK=false
2424 export INPUT_SKIP_FETCH=false
25+ export INPUT_DISABLE_GLOBBING=false
2526
2627 # Configure Git
2728 if [[ -z $( git config user.name) ]]; then
@@ -400,3 +401,38 @@ git_auto_commit() {
400401
401402 assert_equal $current_sha $remote_sha
402403}
404+
405+ @test " It does not expand wildcard glob when using INPUT_PATTERN and INPUT_DISABLE_GLOBBING in git-status and git-add" {
406+
407+ # Create additional files in a nested directory structure
408+ echo " Create Additional files" ;
409+ touch " ${FAKE_LOCAL_REPOSITORY} " /new-file-a.py
410+ mkdir " ${FAKE_LOCAL_REPOSITORY} " /nested
411+ touch " ${FAKE_LOCAL_REPOSITORY} " /nested/new-file-b.py
412+
413+ # Commit changes
414+ echo " Commit changes before running git_auto_commit" ;
415+ cd " ${FAKE_LOCAL_REPOSITORY} " ;
416+ git add . > /dev/null;
417+ git commit --quiet -m " Init Remote Repository" ;
418+ git push origin master > /dev/null;
419+
420+ # Make nested file dirty
421+ echo " foo-bar" > " ${FAKE_LOCAL_REPOSITORY} " /nested/new-file-b.py;
422+
423+ # ---
424+
425+ INPUT_FILE_PATTERN=" *.py"
426+ INPUT_DISABLE_GLOBBING=true
427+
428+ run git_auto_commit
429+
430+ assert_success
431+
432+ assert_line " INPUT_FILE_PATTERN: *.py"
433+ assert_line " ::debug::Push commit to remote branch master"
434+
435+ # Assert that the updated py file has been commited.
436+ run git status
437+ refute_output --partial ' nested/new-file-b.py'
438+ }
0 commit comments