06 Nov 2013, 20:00
Generic-user-small

Gallagher Polyn (6 posts)

Hey,

In 5.6, “Running Commands with the Capistrano Shell,” on my page(s) 138(-9), the authors direct the reader to clone massiveapp to a current directory that would appear to have a Vagrantfile (and other . files) already inside. So, the following command:

git clone -q git@github.com:deployingrails/massiveapp.git .

…results in failure…

fatal: destination path ‘.’ already exists and is not an empty directory.

What gives?

G

07 Nov 2013, 15:57
Tom_sq_150_pragsmall

Tom Copeland (78 posts)

Hi Gallagher -

Whoa, I’m not sure how we missed this issue when we were working on this section, sorry about that.

Your best bet is probably to move the Vagrantfile out of the way temporarily:

mv Vagrantfile /tmp/tmp_Vagrantfile && git clone -q git@github.com:deployingrails/massiveapp.git . && mv /tmp/tmp_Vagrantfile Vagrantfile

15 Nov 2013, 12:43
Generic-user-small

Gallagher Polyn (6 posts)

Tom,

Sorry, no go.

Here is what I get after running your command:

fatal: destination path '.' already exists and is not an empty directory.

Checking the current directory reveals these contents:

. .. .vagrant

…where .vagrant is a folder structure.

I thought maybe I’d clone to another directory and then move the Vagrantfile and .vagrant there, but the whole thing is getting messy. In particular, I don’t like the contingency of ‘orphaned’ virtual boxes. (What, when orphaning happens, would you recommend users do, what commands?)

In light of the foregoing, would some variation of these steps actually be useful in future workflow, or can I leave this aside as a one-off exercise?

G

18 Nov 2013, 14:38
Tom_sq_150_pragsmall

Tom Copeland (78 posts)

Oh right, I forgot about the .vagrant directory. You can “rm -rf .vagrant” to start over with that machine. Or if you want to keep it you could move it out of the directory and then move it back in.

Yup, if you want to clone a repo it’s got to be done in an empty directory, so knowing how to sort out these issues will be generally helpful.

  You must be logged in to comment