Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

shocco fails to install under Homebrew with non-default hb root #19

Open
jwhitley opened this issue May 23, 2012 · 4 comments
Open

shocco fails to install under Homebrew with non-default hb root #19

jwhitley opened this issue May 23, 2012 · 4 comments

Comments

@jwhitley
Copy link

Repro steps

  1. Install Homebrew to something other than /usr/local. E.g. /opt/brew
  2. brew install --HEAD shocco
  3. shocco which shocco

Actual result

>> shocco `which shocco`
shocco: markdown command not found.

NOTE: markdown was correctly installed as a dependency by the brew formula and exists on PATH.

Expected result

Works


The first-order failure cause is due to this line in the built shocco script:

MARKDOWN='/opt/hb/Cellar/shocco/HEAD/libexec/bin/markdown'

This is wrong. Markdown exists on PATH and was never installed to this location. ./configure made this up because it couldn't find markdown.

The root cause is shocco's ./configure script, which is why I'm filing this here vs. against the brew formula. It explicitly overrides the user's PATH and reconstructs it from scratch, guessing at likely install locations of dependent tools such as pygments and markdown, including the default homebrew install prefix. It's not clear why the script reconstructs PATH, but this seems like a brittle policy for the reason illustrated in this issue.

Proposed fix

If brew is available, use brew --prefix to figure this out.

@adamv
Copy link
Contributor

adamv commented May 23, 2012

I wouldn't use brew to fish out the location, just use the result of which thing.

@jwhitley
Copy link
Author

@adamv Yes, I'd prefer leaving PATH alone and using which as well. I was mostly going with the (unspoken) assumption that there was some reason to reconstruct PATH in the first place that I wasn't aware of.

@apeschel
Copy link

It looks like this may be fixed in 855b0d79

@jwhitley
Copy link
Author

Clarification: @apeschel is referring to Homebrew/legacy-homebrew@855b0d7

I'll confirm that the Formula's patch to the configure script works for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants