Will edit with more details, but basically:
set -a; eval "$(pkgx +blah)"; set +a; blah does not always behave the same way as pkgx +blah blah
For example, set -a; eval "$(pkgx +curl)"; set +a; curl https://google.com produces a certificate error, while pkgx +curl curl https://google.com works fine (at least on my machine).
The problem seems to be due to the SSL_CERT_FILE environment variable, which becomes the same path twice in a row (with a separating colon). Something like: /Users/user/.pkgx/stuff/cert.pem:/Users/user/.pkgx/stuff/cert.pem. If you edit the variable to be just the single path /Users/user/.pkgx/stuff/cert.pem after set +a, curl begins to work on HTTPS links again.
The strange thing is though: if you run pkgx +curl echo $SSL_CERT_FILE, it does print out the double path. How does this work behind the scenes? Why does eval "$(pkgx ...)" behave differently from the one-liner?
Will edit with more details, but basically:
set -a; eval "$(pkgx +blah)"; set +a; blahdoes not always behave the same way aspkgx +blah blahFor example,
set -a; eval "$(pkgx +curl)"; set +a; curl https://google.comproduces a certificate error, whilepkgx +curl curl https://google.comworks fine (at least on my machine).The problem seems to be due to the
SSL_CERT_FILEenvironment variable, which becomes the same path twice in a row (with a separating colon). Something like:/Users/user/.pkgx/stuff/cert.pem:/Users/user/.pkgx/stuff/cert.pem. If you edit the variable to be just the single path/Users/user/.pkgx/stuff/cert.pemafterset +a, curl begins to work on HTTPS links again.The strange thing is though: if you run
pkgx +curl echo $SSL_CERT_FILE, it does print out the double path. How does this work behind the scenes? Why doeseval "$(pkgx ...)"behave differently from the one-liner?