Skip to content

brew config: output of curl path and version #3433

Closed

Description

@miccal

Output of brew config:

-bash-4.4.12- /Users/miccal [> brew config
HOMEBREW_VERSION: 1.3.6-190-ge300713
ORIGIN: https://github.com/Homebrew/brew
HEAD: e300713f253029ef91a86bc4006d316582fc6d13
Last commit: 31 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 09c4dd5f89931a49fb2679df3ad05d38b96372e1
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.15.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.26.1/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.2_1/bin/ruby
Java: 1.6.0_65-b14-468
macOS: 10.13.1-x86_64
Xcode: N/A
CLT: 9.0.1.0.1.1506734476
X11: 2.7.11 => /opt/X11

Output of brew doctor:

-bash-4.4.12- /Users/miccal [> brew doctor
Your system is ready to brew.

To help us debug your issue please explain:

  • What you were trying to do (and why)

I was reviewing the output of brew config after noting that the PR #3420 added the output of the curl path and version to brew config, as shown below:

Curl: 7.54.0 => /usr/bin/curl
  • What happened (include command output)

The output of the curl path and version is not correct on my system, as I use a brew'ed curl:

-bash-4.4.12- /Users/miccal [> which curl
/usr/local/opt/curl/bin/curl
-bash-4.4.12- /Users/miccal [> curl --version
curl 7.56.1 (x86_64-apple-darwin17.0.0) libcurl/7.56.1 SecureTransport zlib/1.2.11
Release-Date: 2017-10-23
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets 

Note that I have the following added to my .bash_profile:

export PATH="/usr/local/opt/curl/bin:$PATH"
  • What you expected to happen

Question: Should brew config output the correct curl path and version?

  • Step-by-step reproduction instructions (by running brew commands)

If you are not using the system curl, check the output of Curl: in brew config.

Activity

  1. MikeMcQuaid commented on Nov 7, 2017

    @MikeMcQuaid
    Member

    This is correct, Homebrew does not use the brewed curl unless the system one is too old.

  2. miccal commented on Nov 7, 2017

    @miccal
    ContributorAuthor

    Thanks @MikeMcQuaid. Another question if I may - I have not set either of the environment variables HOMEBREW_PREFIX or HOMEBREW_NO_AUTO_UPDATE, and they do not appear when I printenv. Obviously setting HOMEBREW_PREFIX is automatic, but why is HOMEBREW_NO_AUTO_UPDATE set in my brew config if I have not personally set it?

  3. MikeMcQuaid commented on Nov 7, 2017

    @MikeMcQuaid
    Member

    @miccal Nice spot; that was reuse of a variable and will be fixed in #3435.

  4. miccal commented on Nov 28, 2017

    @miccal
    ContributorAuthor

    @MikeMcQuaid I have a related question to this issue - I was reviewing the output of brew config after #3482 was merged, as shown below:

    HOMEBREW_VERSION: 1.3.8-46-gf50ae44
    ORIGIN: https://github.com/Homebrew/brew
    HEAD: f50ae449800c85b53910bf294b9271c45c25da01
    Last commit: 3 hours ago
    Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
    Core tap HEAD: fc480fcce726cfbeec342b1323a71f89c2cec4ba
    Core tap last commit: 5 hours ago
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_DEVELOPER: 1
    HOMEBREW_ENV_FILTERING: 1
    HOMEBREW_FORCE_BREWED_CURL: 1
    HOMEBREW_NO_ANALYTICS: 1
    CPU: quad-core 64-bit broadwell
    Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
    Clang: 9.0 build 900
    Git: 2.13.6 => /Library/Developer/CommandLineTools/usr/bin/git
    Curl: 7.56.1 => /usr/local/opt/curl/bin/curl
    Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.26.1/bin/perl
    Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
    Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.2_1/bin/ruby
    Java: 1.6.0_65-b14-468
    macOS: 10.13.1-x86_64
    Xcode: N/A
    CLT: 9.1.0.0.1.1508540944
    X11: 2.7.11 => /opt/X11
    

    I notice that setting HOMEBREW_FORCE_BREWED_CURL now reports that the brew'ed curl is in use, but I also note the addition of HOMEBREW_ENV_FILTERING: 1 as a consequence of #3487, and I also note that now brew config is reporting

    Git: 2.13.6 => /Library/Developer/CommandLineTools/usr/bin/git
    

    where before

    Git: 2.15.0 => /usr/local/bin/git
    

    and on my system

    -bash-4.4.12- /Users/miccal (33) [> which git
    /usr/local/bin/git
    

    Is this a consequence of HOMEBREW_ENV_FILTERING: 1, and is this the intended behaviour?

    Thanks.

  5. ilovezfs commented on Nov 28, 2017

    @ilovezfs
    Contributor

    Try export HOMEBREW_GIT=/usr/local/opt/git/bin/git

  6. miccal commented on Nov 28, 2017

    @miccal
    ContributorAuthor

    @ilovezfs thanks, I realise I can do that, but the point is that this has changed very recently, I assume with the merging of #3487, and wondered if it was intended.

  7. ilovezfs commented on Nov 28, 2017

    @ilovezfs
    Contributor

    /usr/local/bin is deliberately filtered out of the PATH, so yes this works as currently designed.

  8. miccal commented on Nov 28, 2017

    @miccal
    ContributorAuthor

    OK, thanks.

  9. miccal commented on Nov 29, 2017

    @miccal
    ContributorAuthor

    @ilovezfs one final question if I may - if /usr/local/bin is bing filtered out of PATH by HOMEBREW_ENV_FILTERING, why are Perl, Python and Ruby not affected in brew config (although Python is in /usr/local/opt):

    Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.26.1/bin/perl
    Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
    Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.2_1/bin/ruby
    

    Sorry for the query, just curious!

  10. ilovezfs commented on Nov 29, 2017

    @ilovezfs
    Contributor

    Those requirements use Requirement#which or Requirment#which_all, which use ORIGINAL_PATHS. The git requirement uses Utils::git_available?, which doesn't.

  11. miccal commented on Nov 29, 2017

    @miccal
    ContributorAuthor

    Great, thanks again @ilovezfs.

  12. electriquo commented on Apr 20, 2018

    @electriquo

    @miccal: i came across this thread and was wondering:

    1. is it possible to specify custom perl, python, and ruby binaries for brew to use?
    2. if the answer to the previous question is yes, then how it can be done? (maybe something similar to HOMEBREW_GIT)

    thanks.

  13. MikeMcQuaid commented on Apr 20, 2018

    @MikeMcQuaid
    Member

    is it possible to specify custom perl, python, and ruby binaries for brew to use?

    Yes.

    if the answer to the previous question is yes, then how it can be done? (maybe something similar to HOMEBREW_GIT)

    Build from source with --env=std. Note that this is not tested and we will not fix any issues that arise using this.

  14. locked and limited conversation to collaborators on May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions