defunkt / cijoe

CI Joe is a fun Continuous Integration server. Unmaintained.
MIT License
1.05k stars 129 forks source link

Ran into a problem with "sh" on Ubuntu 11.04 and CIJoe's "build-worked" hook... #69

Closed al-the-x closed 6 years ago

al-the-x commented 13 years ago

Thanks for the great utility. I'm starting to use CIJoe as a quick-start CI tool for teams that I work with. It's a great way to get them familiar with the concepts. At my current assignment, we were attempting to use CIJoe with a PHP project and defined a "build-worked" script as follows:

#!/usr/bin/env php
<?php

echo "Build Complete!";

When CIJoe attempted to run the script, it complained about a syntax error on line 2: it was attempting to pipe in a file named "?php". We removed the sh invocation from CIJoe#run_hooks and it ran cleanly. Apparently dash (which is invoked by sh on Ubuntu 11.04) wasn't reading the shebang line correctly. We changed the shebang to refer directly to the PHP executable, instead of editing the gem, and still no love.

I understand dropping into a sub-shell to execute the file, but since it's already checked as an executable script, is that necessary? Anyway, it seems to work for us. Thanks again,

David et al


This change is Reviewable

al-the-x commented 11 years ago

Hey, @defunkt, you still manning this ship? There are quite a few PRs lying around in here...

JOEFOSTER9 commented 8 years ago

Seth?