-
Notifications
You must be signed in to change notification settings - Fork 105
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
insertPackage should work with absolute filenames? #7
Comments
Yes indeed it should. I must have busted that when generalizing for git(hub) use. We need to look at |
I'll give it a try; my inner perl hacker (ugh) says to rewrite
as
|
oh, and maybe wrap that all with |
I'd pre-test with
etc |
There is already a check for the file at the head of the function. |
Attempts to copy to curwd/file, then to file. Fixes eddelbuettel#7.
It's not quite right.
If we are in curwd, then both branches are equivalent, so this does not yet help enough. I'll look at it some more on the train home in a few hours. |
It might help if you convert the path to absolute in the first place. E.g. absolute_path <- function(path) {
path <- path.expand(path)
if (substr(path, 1, 1) == "/") {
path
} else {
file.path(getwd(), path)
}
} Btw. why can't you just say |
Nice idea, thanks. It should actually be pretty simple. |
The |
I'm not sure both "both branches are equivalent":
but you're right, I forget to fix the |
amending previous 'fix' for eddelbuettel#7
towards fixing eddelbuettel#7
The The |
Ack re your comment of both branches being different. The problem was the thinko related to the earlier |
This may actually be much less scary than we thought. Can you look at what I just committed? Either via checkout, or by simply pulling the relevant file as is ? |
LGTM for absolute paths. Should there be a catch on |
Great, and a) sorry for the earlier runaround and b) yes that is a very good idea. Help page suggest that a boolean is returned to lemme add that. |
The following code:
fails with an error like:
I am using drat 0.2.0 with git2r, from the directory /home/spav/myworking/directory/basically/pwd
The text was updated successfully, but these errors were encountered: