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

GIT_DIR and Windows #47

Closed
celston opened this issue Jun 13, 2016 · 6 comments
Closed

GIT_DIR and Windows #47

celston opened this issue Jun 13, 2016 · 6 comments

Comments

@celston
Copy link

celston commented Jun 13, 2016

I might be in the minority but my primary workstation is a Windows machine. I believe this is causing parts of this plugin to not work.

I'm working on a Drupal 7.x project in which I'm trying to use the Twitter module. There's a documented bug, with patch, posted here:

https://www.drupal.org/node/2584363

When I attempt to apply that patch through this plugin, I get the following:

https://www.drupal.org/files/issues/trying_to_get_property-2584363-5_0.patch (Property of non-object)
cd "web/sites/all/modules/contrib/twitter/" && GIT_DIR=. git apply --check "-p1" "/tmp/575f098747286.patch"
'GIT_DIR' is not recognized as an internal or external command,
operable program or batch file.

Best I can tell, the GIT_DIR is redundant to the cd command. If I remove the GIT_DIR clause directly from the plugin source, the patch works.

@cweagans
Copy link
Owner

Can you please post your complete composer.json so that I can attempt to reproduce? I'll have to set up a Windows box soon anyway, so happy to take a look.

Note that I'm unlikely to add Windows support to 1.x unless it's a very simple change, but I'm happy to plan for it in 2.x, which should be out soon (I'm hoping to get to a beta this weekend, but we'll see).

@celston
Copy link
Author

celston commented Jun 15, 2016

My workaround currently is to just remove the "GIT_DIR=." from the patch commands and it's working. I don't have a perfect understanding of git and those environment variables so I'm not sure what impact just removing that piece has.

composer.json.txt

@cweagans
Copy link
Owner

Looks like that came in toward the beginning of the project. Since we're cding into the right dir, I guess GIT_DIR is probably not needed.

@morsok
Copy link

morsok commented Jul 25, 2016

We are having the same issue on a windows machine, anything I can do to help ?

@cweagans
Copy link
Owner

I'd say just open a PR to remove the GIT_DIR usage.

@cweagans
Copy link
Owner

cweagans commented Jun 2, 2018

Looks like this is good now?

@cweagans cweagans closed this as completed Jun 2, 2018
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

No branches or pull requests

3 participants