Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make test-* fails "can't open input file: urchin" #565

Closed
xcambar opened this issue Oct 31, 2014 · 2 comments · Fixed by #568
Closed

make test-* fails "can't open input file: urchin" #565

xcambar opened this issue Oct 31, 2014 · 2 comments · Fixed by #568

Comments

@xcambar
Copy link
Contributor

xcambar commented Oct 31, 2014

Whether I run npm run-script test/install_script or make test-zsh (didn't try all of them),
the process exits non-zero with the following error:

zsh: can't open input file: urchin

I noticed a variation on how urchin is installed:

  • with npm locally (here)
  • globally in Travis (here) and specfied in the URCHIN envVar here.

That may be the source of the failure, though I can not be affirmative about it.

@mklement0, as you authored this PR, can you tell if, on your own machine, urchin is installed globally or via NPM? Any other thought can help of course ;)

Note that I reproduced the error on a fresh clone.

@mklement0
Copy link
Contributor

@xcambar: Sorry for breaking that.

No, the variations in how Urchin is installed are not to blame (as an aside, both your links to .travis.yml show the environment-variable method, so there are effectively only 2 scenarios: on developer machines, locally installed, via npm install, and, by contrast, environment-variable-based on Travis. However, the makefile would find a globally installed Urchin, too).

The real problem is that on developer machines Urchin is now invoked by filename only (I changed the Makefile to add the local npm bin path to the $PATH, allowing invocation of locally installed utilities by filename only): That works fine when invoking such utilities directly, but causes problems when you pass them to some shells: dash and zsh (in contrast with bash and ksh) don't search the $PATH when you pass them a script filename for execution (e.g., with urchin in the $PATH, bash urchin works just fine, whereas zsh urchin doesn't).

I've submitted a fix (#568) that simply removes the part where the specified shell is used to invoke Urchin; i.e., Urchin is now invoked directly.
The rationale is that these cross-shell tests don't actually work anyway at the moment (due to the sh shebang lines in the test scripts, they are always run with sh, irrespective of what shell Urchin itself is invoked with - see #551), so this change has no adverse effect.

Once Urchin has been amended, true cross-shell tests will be implemented via an option passed to Urchin - so the problem you've encountered here will not resurface (given that Urchin will continue to be invoked directly, not as a file argument passed to a shell).

@ljharb: I hope you're OK with this.

@xcambar
Copy link
Contributor Author

xcambar commented Oct 31, 2014

Aaaah, ok, so that's the whole point of it.
Thanks for clarifying.

I'm closing in favor of your PR.

@xcambar xcambar closed this as completed Oct 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants