Threadscope's gettext.sh file interferes with git on Windows
Asked Answered
P

1

1

When I run git commands, I'm noticing I get strange messages wrt a totally unrelated program, namely threadscope, which I use for obtaining information on my parallel Haskell programs.

 git stash
': not a valid identifier/threadscope-0.2.2/bin/gettext.sh: line 90: export: `dashless
': not a valid identifier/threadscope-0.2.2/bin/gettext.sh: line 90: export: `USAGE
': not a valid identifier/threadscope-0.2.2/bin/gettext.sh: line 90: export: `stash_msg

I'm not sure what is causing this. It seems benign, but it is a bit annoying. It seems related to the program 'gettext.exe' but I am unable to find information online on what it does.

The line 90 in question in gettext.sh is

eval_gettext () {
  gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
}

Could someone help me with getting rid of these messages in the right way?

I'm using Window 10. I installed threadscope by downloading the binaries from https://wiki.haskell.org/ThreadScope#Installing_ThreadScope and placing them in my program files folder.

Proprietress answered 20/8, 2017 at 3:4 Comment(6)
I've tried renaming the gettext.exe and gettext.sh files, and it resolves the problem. My question now is what these files are used for, if it's safe to remove from threadscope, and why it would have caused the problem in the first place.Proprietress
@ChrisMartin how do I determine if that is the case?Proprietress
gettext is part of what is called internationalization (i18n) and localization (l10n), in which programs that might print "hello world" when run in the US would print "hola mundo" when run in Spain. (The names i18n and l10n are formed by counting the dropped letters in the middle. The actual control is done by user choice, rather than physical location.)Bubonocele
@Bubonocele Since the default language for threadscope seems to be English, would it be safe to believe I can remove(or rename) gettext.exe and gettext.sh from my threadscope bin folder? Threadscope itself seems to run fine without it. I'm merely afraid there might be inadvertent consequences.Proprietress
In general, programs that use gettext should behave well if there are no translations available. I can't say that this particular program does, though.Bubonocele
Hmm alright. That's good enough for me. If my program does act up, I'll take further steps then.Proprietress
A
1

Try setting (for testing) a simplified PATH in a CMD session

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

set PATH=%PATH%;/path/to/ThreadScope/bin

Meaning: you set Git first, then ThreadScope in the PATH: see if both are running better in that new context.

Aday answered 20/8, 2017 at 7:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.