Skip to content
New issue

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

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

Already on GitHub? # to your account

check_win does not reset email to original #2152

Closed
muschellij2 opened this issue Nov 26, 2019 · 3 comments
Closed

check_win does not reset email to original #2152

muschellij2 opened this issue Nov 26, 2019 · 3 comments

Comments

@muschellij2
Copy link
Contributor

May be related to #1723.

When using check_win_devel with the email argument, this does not reset after submission. I see https://github.com/r-lib/devtools/blob/master/R/check-win.R#L61 should indeed copy the original DESCRIPTION file over, but the example below shows that's not the case:

library(devtools)
#> Loading required package: usethis
library(desc)
path = tempfile()
create_package(path, fields = 
                 list(
                   `Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"),
                          comment = c(ORCID = "YOUR-ORCID-ID"))',
                   License = "MIT + file LICENSE",
                   Language =  "es"
                 ),
               open = FALSE)
#> ✔ Creating '/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmpr1oav9/file98c05eb60133/'
#> ✔ Setting active project to '/private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmpr1oav9/file98c05eb60133'
#> ✔ Creating 'R/'
#> ✔ Writing 'DESCRIPTION'
#> Package: file98c05eb60133
#> Title: What the Package Does (One Line, Title Case)
#> Version: 0.0.0.9000
#> Authors@R (parsed):
#>     * Jane Doe <jane@example.com> [aut, cre] (<https://orcid.org/YOUR-ORCID-ID>)
#> Description: What the package does (one paragraph).
#> License: MIT + file LICENSE
#> Encoding: UTF-8
#> Language: es
#> LazyData: true
#> ✔ Writing 'NAMESPACE'
#> ✔ Setting active project to '<no active project>'
desc = desc::description$new(file.path(path, "DESCRIPTION"))
desc$get_maintainer()
#> [1] "Jane Doe <jane@example.com>"
devtools::check_win_devel(pkg = path, email = "bob@bob.com")
#> Building windows version of file98c05eb60133 (0.0.0.9000) for R-devel with win-builder.r-project.org.
#>   
   checking for file/private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmpr1oav9/file98c05eb60133/DESCRIPTION...checking for file/private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmpr1oav9/file98c05eb60133/DESCRIPTION’ (377ms)
#> preparingfile98c05eb60133:
#>    checking DESCRIPTION meta-information ...checking DESCRIPTION meta-information
#> checking for LF line-endings in source and make files and shell scripts
#> checking for empty or unneeded directories
#>    Removed empty directory ‘file98c05eb60133/R’
#> ─  building ‘file98c05eb60133_0.0.0.9000.tar.gz’
#> 
  
   
#> 
#> [05:59 PM (2019-11-26)] Check bob@bob.com for a link to the built package in 15-30 mins.
desc = desc::description$new(file.path(path, "DESCRIPTION"))
desc$get_maintainer()
#> [1] "Jane Doe <bob@bob.com>"

Created on 2019-11-26 by the reprex package (v0.3.0.9000)

@muschellij2 muschellij2 changed the title check_win does not return email to original check_win does not reset email to original Nov 26, 2019
@jimhester
Copy link
Member

The problem is the on.exit() lower down overwrites it

on.exit(unlink(built_path))

The second one needs a add = TRUE argument as well.

muschellij2 added a commit to muschellij2/devtools that referenced this issue Dec 3, 2019
jimhester pushed a commit that referenced this issue Dec 3, 2019
* added add = TRUE for on.error, fixing #2152

* added fix to the news
@jimhester
Copy link
Member

Closed by #2157

@lock
Copy link

lock bot commented Jun 24, 2020

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jun 24, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants