Skip to content

Broken push with Newline in title#600

Closed
muschellij2 wants to merge 27 commits intor-lib:masterfrom
muschellij2:master
Closed

Broken push with Newline in title#600
muschellij2 wants to merge 27 commits intor-lib:masterfrom
muschellij2:master

Conversation

@muschellij2
Copy link
Copy Markdown
Contributor

PR goal: fix newline

This is a smaller PR than #493 which has fixed the paths issue. This may be fixed as I've opened issue with r-lib/gh#92. Other than whitespace, the main fix is simple gsub on \n.

Here would be a reprex but the non-interactive choices need to be made with ui_yeah, so I'll use the example r-lib/gh#92 to show that it's an issue.

library(usethis)
pkgpath <- file.path(tempdir(), "testpkg")
create_package(pkgpath, open = FALSE) # creates package below temp directory
proj_set(pkgpath)

dfile = proj_path("DESCRIPTION")
desc = desc::desc(file = dfile)
desc$set("Title" = "I Want a Newline\n In My Title")
desc$write(file = dfile)
desc$get("Title")


## now, working inside "testpkg", initialize git repository
use_git()

## create github repository and configure as git remote
use_github(protocol = "https") ## to use https

Typo/Whitespace

Also, slight fix with spacing on template.R, where reprex is (before fix):

usethis::use_template("blah")
#> Error: Could not find template 'blah'in package 'usethis'.

and

usethis::use_template("blah")
#> Error: Could not find template 'blah' in package 'usethis'.

after fix.

@hadley
Copy link
Copy Markdown
Member

hadley commented Jan 24, 2019

This still seems to include a bunch of unrelated changes which makes it hard to review.

@hadley
Copy link
Copy Markdown
Member

hadley commented Jan 24, 2019

It looks like you're working in master, which tends to cause problems — you might want to read https://happygitwithr.com/fork-and-clone.html#dont-touch-master

@hadley hadley closed this Feb 4, 2019
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.

2 participants