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

FR: write_over() improvements #767

Closed
krlmlr opened this issue May 20, 2019 · 1 comment · Fixed by #1072
Closed

FR: write_over() improvements #767

krlmlr opened this issue May 20, 2019 · 1 comment · Fixed by #1072
Labels
feature a feature request or enhancement tooling 🔨 Internal usethis tooling

Comments

@krlmlr
Copy link
Member

krlmlr commented May 20, 2019

  1. Preserve line ending. Otherwise we are too much dependent on the "eol" Git config settings. I have an implementation for transforming a file preserving line endings in {enc}, but I'm retiring it: https://github.com/krlmlr/enc/blob/master/R/io.R#L110.

  2. Consider adding an ask argument that defaults to interactive(), so that other tools can call this function to unconditionally overwrite.

@jennybc jennybc added feature a feature request or enhancement tooling 🔨 Internal usethis tooling labels Jul 2, 2019
@hadley
Copy link
Member

hadley commented Mar 17, 2020

We also need to handle the case where the file doesn't yet exist; possible by reading the line endings from the DESCRIPTION (not sure where to look if the project isn't a package).

hadley added a commit that referenced this issue Mar 23, 2020
* Set default line ending in `use_rstudio()`. Fixes #1002
* Respect current project line ending in `write_utf8()`. Fixes #767.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement tooling 🔨 Internal usethis tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants