Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use \n line endings #6378

Merged
merged 2 commits into from
Aug 20, 2024
Merged

use \n line endings #6378

merged 2 commits into from
Aug 20, 2024

Conversation

MichaelChirico
Copy link
Member

Closes #6369

Approach:

for (f in list.files(recursive = TRUE)) {
  ch <- tryCatch(readChar(f, file.size(f)), condition=identity)
  if (inherits(ch, "condition")) next
  nch <- tryCatch(nchar(ch), condition=identity)
  if (inherits(nch, "condition")) next
  if (grepl("\r", ch, fixed = TRUE)) {
    cat(sprintf("Overwriting \\r line endings in %s\n", f))
    writeLines(readLines(f), f)
  }
}

@tdhock
Copy link
Member

tdhock commented Aug 19, 2024

great thanks but I just merged the other PR #6368 so now there are conflicts, sorry

@MichaelChirico MichaelChirico requested a review from a team as a code owner August 20, 2024 17:45
@MichaelChirico
Copy link
Member Author

Thanks, regenerated CODEOWNERS.

@MichaelChirico MichaelChirico merged commit b785de6 into master Aug 20, 2024
7 checks passed
@MichaelChirico MichaelChirico deleted the n-line-endings branch August 20, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CODEOWNERS has DOS line endings
2 participants