Keep HTTPIE_VERIFY_SSL value if already set and '--insecure' option is set to 'false'.

This commit is contained in:
Tortue Torche 2019-10-29 11:19:31 +01:00
parent fc338007f1
commit 8838d49d6e
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- If the `--insecure` option is set to `false` and the `HTTPIE_VERIFY_SSL` environment variable is set, we keep its value instead of overwrite it to `yes`.
Useful when we want to use Custom <abbr title="Certificate Authority">CA</abbr> (e.g. `HTTPIE_VERIFY_SSL=/etc/ssl/certs/ca-certificates.crt`). For more information, you can read the [HTTPie docs](https://httpie.org/doc/1.0.3#custom-ca-bundle)
## [1.0.0] - 2019-07-25
### Added
- New actions: `ls`, `status`, `services`, `tasks`, `tasks:healthy`, `containers`, `login`, `lint`, `inspect`, `system:info`, `actions`, `help` and `version`

2
psu
View File

@ -567,7 +567,7 @@ inputs() {
if [ "$insecure" == "true" ]; then
HTTPIE_VERIFY_SSL="no"
else
HTTPIE_VERIFY_SSL="yes"
HTTPIE_VERIFY_SSL="${HTTPIE_VERIFY_SSL:-"yes"}"
fi
if [ "$HTTPIE_VERIFY_SSL" == "no" ] && [ -z "$PYTHONWARNINGS" ]; then
# Fix httpie with Debian and Ubuntu