Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Fix shocco's requirement for a markdown command #16740

Closed
wants to merge 1 commit into from
Closed

Fix shocco's requirement for a markdown command #16740

wants to merge 1 commit into from

Conversation

telemachus
Copy link
Contributor

schocco requires a markdown command. The previous version of the formula
checked for the markdown formula. However, there's an edge case involved.
The discount formula installs a command markdown which can also satisfy
shocco's requirement. (And I would add that discount's implementation of
the markdown command is far superior to markdown's, though I grant that's
debatable.)

This update checks for any markdown-providing install, and if one is not
found tells the user what options are available.

I think this is better than just installing the markdown formula. First, if
discount is already installed, then when brew tries to install markdown,
the linking stage will fail. Although the shocco install as a whole will go
through, the failure message about linking markdown is likely to confuse
the user. Also, if discount is already installed, that problably means the
user doesn't want the markdown formula. Finally, this way of handling
things is more easily extended if other formulas become available which
provide a valid markdown command.

schocco requires a `markdown` command. The previous version of the formula
checked for the markdown formula. However, there's an edge case involved.
The discount formula installs a command `markdown` which can also satisfy
shocco's requirement. (And I would add that discount's implementation of
the `markdown` command is far superior to markdown's, though I grant that's
debatable.)

This update checks for any `markdown`-providing install, and if one is not
found tells the user what options are available.

I think this is better than just installing the markdown formula. First, if
discount is already installed, then when `brew` tries to install markdown,
the linking stage will fail. Although the shocco install as a whole will go
through, the failure message about linking markdown is likely to confuse
the user.  Also, if discount is already installed, that problably means the
user doesn't want the markdown formula. Finally, this way of handling
things is more easily extended if other formulas become available which
provide a valid `markdown` command.
@mistydemeo
Copy link
Member

Pulled minus the comment, thanks a lot!

dholm pushed a commit to dholm/homebrew that referenced this pull request Jan 14, 2013
schocco requires a `markdown` command. The previous version of the formula
checked for the markdown formula. However, there's an edge case involved.
The discount formula installs a command `markdown` which can also satisfy
shocco's requirement. (And I would add that discount's implementation of
the `markdown` command is far superior to markdown's, though I grant that's
debatable.)

This update checks for any `markdown`-providing install, and if one is not
found tells the user what options are available.

I think this is better than just installing the markdown formula. First, if
discount is already installed, then when `brew` tries to install markdown,
the linking stage will fail. Although the shocco install as a whole will go
through, the failure message about linking markdown is likely to confuse
the user.  Also, if discount is already installed, that problably means the
user doesn't want the markdown formula. Finally, this way of handling
things is more easily extended if other formulas become available which
provide a valid `markdown` command.

Closes Homebrew#16740.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
@cdlm
Copy link
Contributor

cdlm commented Jan 22, 2013

It does not seem to work:

$ which markdown
/opt/homebrew/bin/markdown

$ brew install shocco
shocco requires a `markdown` command.
…

@telemachus
Copy link
Contributor Author

shocco was just moved to the "new requirement syntax". I'm guessing it has something to do with that, but I have no time to check right now. See these two commits though:

Edit: Yeah, if you roll back the change in 3ad7174, then it works. I don't know how the new syntax works, however, so I'm not sure where the real problem is.

@jacknagel
Copy link
Contributor

f863ea9

Requirements are now evaluated in an environment identical to that of the build (since that is what matters), so most things that just check for something in $PATH need to opt-in to env :userpaths.

@cdlm
Copy link
Contributor

cdlm commented Mar 16, 2013

@jacknagel still does not work, shocco's makefile tries to install its own copy of markdown even though I have discount installed and $(brew --prefix)/bin/markdown exists… I suppose configure is not getting the correct environment. I also have ronn installed using rbenv and that's not detected as well (but then it's ~/.rbenv/shims/ronn so that's a little far-fetched)

See #18516

ClashTheBunny pushed a commit to ClashTheBunny/homebrew that referenced this pull request Jan 22, 2015
schocco requires a `markdown` command. The previous version of the formula
checked for the markdown formula. However, there's an edge case involved.
The discount formula installs a command `markdown` which can also satisfy
shocco's requirement. (And I would add that discount's implementation of
the `markdown` command is far superior to markdown's, though I grant that's
debatable.)

This update checks for any `markdown`-providing install, and if one is not
found tells the user what options are available.

I think this is better than just installing the markdown formula. First, if
discount is already installed, then when `brew` tries to install markdown,
the linking stage will fail. Although the shocco install as a whole will go
through, the failure message about linking markdown is likely to confuse
the user.  Also, if discount is already installed, that problably means the
user doesn't want the markdown formula. Finally, this way of handling
things is more easily extended if other formulas become available which
provide a valid `markdown` command.

Closes Homebrew#16740.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants