We get this error: .git/hooks/pre-commit: 100: .git/hooks/pre-commit: LD_LIBRARY_PATH=/home/julien/travail/git/gaia/b2g_sdk/34.0a1-2014-08-12-04-02-01/b2g/: not found The issue is that the value we get under Linux as $XULRUNNER_SDK is now an environment variable assignment; however, the shell expands $XULRUNNER_SDK _after_ it adds leading specified environment variable, and as a result it takes the result of this expansion as a file name to execute. The fix is really simple: simply prepend "env" to the command line. Other uses are done inside Makefiles, so Makefile-based expansion kicks in before the command is launched in the shell, and that's why we didn't have this issue.
Created attachment 8491579 [details] [review] github PR
FTR I tested the fix on Linux but Rik was kind enough to test on MacOS that it was still working :)
Comment on attachment 8491579 [details] [review] github PR Hey Alexandre, do you have some time to look at this? Thanks!
Comment on attachment 8491579 [details] [review] github PR I tried to solve it in other ways but does not work :-/ and |env| looks also a regular way to set a environment variables, so r=yurenju if we point out the reason which we use |env| in tools/pre-commit.
Added a comment and landed in: master: 576ab24aeb3e53fdf6cc328ce7f038ad234b6d0b Yeah, it's actually the first time I understand why "env" is useful without the "-i" parameter :)
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.