-
Notifications
You must be signed in to change notification settings - Fork 493
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
[MINGW64] [gettext] ': not a valid identifierline 89: export: `dashless #735
Comments
For me it happens in both MINGW32 and MINGW64 shell. WORKAROUND: Downgrade git to 2.9.1. |
* Fixes msys2#735 * Import *sh completion and XSS patches from openSUSE
* Fixes msys2#735 * Import *sh completion and XSS patches from openSUSE
* Fixes msys2#735 * Import *sh completion and XSS patches from openSUSE
* Fixes msys2#735 * Import *sh completion and XSS patches from openSUSE
@Alexpux, it turned out #741 doesn't resolve the issue actually - it was a coincident I hadn't So #741 is just an update of the git version. |
The problem with removing |
Found the culprit: EDIT: Made a little shim redirecting to
In the end, it's a bug in mingw64's |
@Alexpux please reopen this. |
@bit2shift I didn't mean removing of |
This seems to break(ish) git rebase and rebase interactive.
I tried fiddling around with the git scripts a bit, but I don't know how to debug it. |
@DragoonX6 did you remove|disable |
I did not touch it.
|
@DragoonX6 so you completely disregarded my comment from 6 days ago about |
Oh, my bad, I missed that. Is your shim simply an override added to the path? |
It was just to see what arguments were being passed through. |
Alright that works as a workaround for now. |
@bit2shift Thanks for the workaround. I can confirm that it works. Although I have no idea what it might break. |
Any update on this one? Did a |
Issue exists still. |
Issue exists with mingw32 variant when you install 32-bit version of the MSYS2 toolset as well. There seems to be several problems lurking in everything right at the moment. If you do a pacman -Syu, you get zapped by this and more. |
I've figured out what's happening, although I don't have a fix yet: git's shell script library includes Specifically, git-sh-setup calls
This is the specific line which creates the "export" error you see in the stderr output. The specific difference between /mingw32/bin/envsubst.exe and /usr/bin/envsubst.exe output is:
OK, that all looks OK. But...
mingw32's envsubst uses CRLF line endings not LF. The I can think of three possible approaches to fix this:
I don't know enough about MSYS2 internals to know which of these (if any) is a good idea. |
@projectgus great research! Pinging @mingwandroid. |
@projectgus you could've saved yourself a considerable amount of time had you read all the comments and proceeded immediately to test the output of both |
I did read those, and I ran envsubst a few times at first with different input (I wouldn't have had a clue where to start without all the good detective work already done in this thread). But I couldn't see what the difference between the two envsubst calls was until I worked backwards and found the eval_gettext shell function, which is when the penny dropped. Apologies if my comment was telling you things you already knew. |
@mingwandroid If you have any suggestions of where/how to fix this one, I'm happy to try and come up with a PR as well if this is helpful. |
bit2shift's workaround left me with a broken git that couldn't clone repositories unfortunately, reporting bad object errors whenever I tried to do so. A workaround that is working for me, however, is patching gettest.sh to invoke |
@MaulingMonkey you must be using some weird MSYS2 configuration (eg. modifications to |
@MaulingMonkey also make sure you're not being affected by #30 (hint: rust). |
"both |
Well, I can't reproduce the problem both of you are having. |
I ran into trouble before even firing up cargo RE: #30. That said, it looks like my compounding failures were from trying to use msys's git with a network share CWD, not your workaround - sorry!
Edit: And my fairly vanilla install process for posterity:
|
FWIW, I currently use this workaround which works fine for invoking git from the shell: Add to
This excludes the MINGW32/64 paths (and everything not in MSYS2 main path) when running git, and so it doesn't end up running a non-MSYS It's possible to use different variants of this hack, and it might not work for shell scripts which do git stuff, but for the shell this is enough. |
I can say that the renaming of envsubset.exe and installing gettext solved it for me, i was getting error I really dont think it showed up until i added .bashrc or .bashprofile modifications, so it may be something that belongs in other distros made its way to the configs or something, not really sure there. I dont have time to debug it much. However i really hope that renaming |
I now use a better solution which also works with shell scripts which use git. I created #!/bin/sh
PATH=/bin git "$@" which does the same thing, but more robust ( This also works with redirections, e.g. |
It could be packaged this way for now as an official workaround. Can you prepare a PR? |
Assuming this was meant for me, I'd prefer someone else more versed in MSYS2 setup would do that. It should take few secs if you know what you're doing, but quite a bit more if I did that because I haven't PR'ed MSYS2 packages in the past. |
Can I suggest that the change to mingw64/bin/gettext.sh be made the official solution? It's kinda ridiculous that an out-of-the-box installation of MSYS2 64-bit has a problem like this. |
Having this issue on |
Happening on |
I am trying to do one of the possible ways suggested to fix the problem.
|
git 2.16.2 here
|
@tofutim do you update all packages to latest? |
Let me try that, though I found the bashrc trick did solve the problem. |
I'm seeing this issue on a 64-bit cygwin installation with
|
For some obscure reason,
git submodule
outputs:from the mingw64 shell, but not from the mingw32 and msys shells.
It occurs on all repos, even those without submodules.
which git
returns/usr/bin/git
on all the 3 shells.which perl
returns/usr/bin/perl
on all the 3 shells.I've been unsuccessful at finding the root cause of this glitch. It's driving me nuts.
EDIT: a workaround for the moment is available in #735 (comment).
The text was updated successfully, but these errors were encountered: