-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2042: feat(cli) Improve environment variables parsing r=Hywan a=Hywan # Description This PR fixes #2028. In #1762 we have already improved environment variables syntax, but the same work must be done in the CLI crate. The following environment variables are considered incorrect: * `A`, no equal sign, * `A=`, value is missing, * `=A`, key is missing. The following environment variables are considered correct: * `A=B` with `A` for the name and `B` for the value, * `A=B=C` with `A` for the name and `B=C` for the value. The environment variable is trimmed before being parsed with [`str::trim`](https://doc.rust-lang.org/std/primitive.str.html#method.trim). This PR also adds tests for the `parse_envvar` function, which was missing. # Review - [x] Add a short description of the the change to the CHANGELOG.md file 2044: feat(c-api) Do not build C headers if the env var `DOCS_RS` exists r=Hywan a=Hywan # Description Fix #1954. According to https://docs.rs/about/builds, the `DOCS_RS` environment variable is set when the documentation is built from docs.rs. In this case, we must not build the C headers because it generates such error (see #1954 to learn more): > Unable to copy the generated C bindings: `Os { code: 30, kind: Other, message: "Read-only file system" }` # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
- Loading branch information
Showing
3 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters