This isn’t an issue with Codeship as such, but it can affect it.
I had a task in an
npm script that created some directories for a couple of cli tools that (for whatever reason) expected directories to be present but wouldn’t create them:
This task worked locally (on OS X El Capitan) but the first time I tried to build on Codeship, my tests failed.
Working out why was pretty straightforward. Codeship images use Ubuntu. Ubuntu uses
dash rather than
There wasn’t much point spending time on such a simple line, so I went with the cheap fix of listing out each
mkdir in long form:
I need to remember that:
- Avoiding fancy stuff is sensible (curly bracket expansion isn’t particularly fancy, but it wasn’t exactly saving me a great deal of effort, either).
- Subtle cross-platform issues crop up all over the place. Using Vagrant, Docker or Otto for consistent development, stage, CI and production environments is a good idea where time allows.
- Running tests on a range of platforms is worthwhile. Time to get up and running with Appveyor, I think.
I like using
npm as a build tool, but keep coming across niggling issues like this.