19:09 Thursday, March 03 2008

share

After fighting this for the past year, I made a huge breakthrough today. The problem was a result of using cygwin/Windows, perforce & Linux together. What would happen was that I'd create/add bash scripts on Linux, and check them into the perforce depot. Then try to run them on Windows with cygwin bash, and they'd blow up due to messed up line endings. To make matters worse, even editing the files in cygwin/bash and checking them back in would result in them being similarly broken. It turns out the solution is so simple, I feel stupid for not finding it sooner. All that I had to do was change the 'Line ending' field in the windows system p4 client from 'win' to 'share' and its fixed.