diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 4572694a8..1d031c47b 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -125,7 +125,9 @@ jobs: ext %in% c("R", "Rmd", "Rnw", "Rmarkdown", "qmd") } changed_r_files <- Filter(is_r_file, changed_files) - dry <- if(isTRUE(as.logical("${{ inputs.auto-update }}"))) "off" else "on" + # TODO: Re-enable after styler unicode issues are fixed + #dry <- if(isTRUE(as.logical("${{ inputs.auto-update }}"))) "off" else "on" + dry <- "on" detect <- styler::style_file(changed_r_files, dry = dry) if (TRUE %in% detect$changed) { problems <- subset(detect$file, detect$changed == T) @@ -155,9 +157,11 @@ jobs: - name: Autocommit styled files ↗️ id: autocommit-styled-files - if: > - inputs.auto-update - && steps.check_files.outputs.files_exists == 'true' + if: false + # TODO: Re-enable after styler unicode issues are fixed + #if: > + # inputs.auto-update + # && steps.check_files.outputs.files_exists == 'true' run: | git config --global user.name 'github-actions' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' @@ -184,12 +188,14 @@ jobs: "or simply run the following commands", "for an immediate fix:\n" )) - cat("────────────────────────────────────────\n") - cat(paste0( - "styler::style_file(", - readLines("/tmp/style-problems.R", warn=FALSE), - ")\n" - )) - cat("────────────────────────────────────────\n") + if (file.exists("/tmp/style-problems.R")) { + cat("────────────────────────────────────────\n") + cat(paste0( + "styler::style_file(", + readLines("/tmp/style-problems.R", warn=FALSE), + ")\n" + )) + cat("────────────────────────────────────────\n") + } quit(status = 1) shell: Rscript {0}