feat(cargo-php)!: escalate privilege and to copy extension and edit ini file
Fixes: #481
BREAKING CHANGE: installing extensions as root user will now fail unless --bypass-root-check is provided
Pull Request Test Coverage Report for Build 16323306954
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 48 (0.0%) changed or added relevant lines in 1 file are covered.
- 193 unchanged lines in 10 files lost coverage.
- Overall coverage increased (+0.6%) to 22.222%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| crates/cli/src/lib.rs | 0 | 48 | 0.0% |
| <!-- | Total: | 0 | 48 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/cli/src/lib.rs | 2 | 0.0% |
| src/builders/sapi.rs | 3 | 96.67% |
| src/zend/mod.rs | 4 | 0.0% |
| build.rs | 5 | 0.0% |
| src/args.rs | 7 | 81.61% |
| src/embed/mod.rs | 9 | 66.67% |
| unix_build.rs | 11 | 0.0% |
| src/flags.rs | 13 | 27.38% |
| src/zend/globals.rs | 51 | 15.26% |
| crates/macros/src/function.rs | 88 | 0.0% |
| <!-- | Total: | 193 |
| Totals | |
|---|---|
| Change from base Build 16035783050: | 0.6% |
| Covered Lines: | 870 |
| Relevant Lines: | 3915 |
💛 - Coveralls
Maybe we can check if we are running with root without needing the dependency, but haven't looked into that.
I'll borrow the function from elevate/sudo crate that check if we are running as root. Knowing the uid/gui should be sufficient here.
@dilawar Thank you! Could you update the guide documentation to include the new behaviour?
The git commit history could benefit from a cleanup as well. See the CONTRIBUTING.md.
I'll definitely give it a shot, but I am terrible at writing! I'll rebase/cleanup git history.
I'll definitely give it a shot, but I am terrible at writing! I'll rebase/cleanup git history.
I can do the documentation :)
nix::unistd looks like a better fit.