File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
.github/workflows/actions/quarto-dev Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,28 @@ runs:
4242 echo "Unexpected package/dist/share path detected: $(quarto --paths)"
4343 Exit 1
4444 }
45- If ( "$(git status --porcelain)" -ne "" ) {
46- echo "Uncommitted changes detected:"
47- git status --porcelain
48- Exit 1
45+ # check if configure is modifying some files as it should not
46+ $modifiedFiles = git diff --name-only
47+ If ($modifiedFiles -ne "") {
48+
49+ # Convert the list to an array
50+ $modifiedFilesArray = $modifiedFiles -split "`n" | ForEach-Object { $_.Trim() }
51+
52+ If ($modifiedFilesArray -contains "tests/Pipfile.lock") {
53+ Write-Output "::warning::test/Pipfile.lock has been modified."
54+ $modifiedFilesArray = $modifiedFilesArray | Where-Object { $_ -notmatch "Pipfile.lock" }
55+ }
56+
57+ # Count the number of modified files
58+ $modifiedFilesCount = $modifiedFilesArray.Count
59+
60+ If ($modifiedFilesCount -ge 1) {
61+ Write-Output "::error::Uncommitted changes detected."
62+ foreach ($file in $modifiedFilesArray) {
63+ Write-Output $file
64+ }
65+ Exit 1
66+ }
4967 }
5068
5169 - name : Quarto Check
You can’t perform that action at this time.
0 commit comments