-
Couldn't load subscription status.
- Fork 79
Open
Labels
cargo-phpRelated to `cargo-php`Related to `cargo-php`enhancementNew feature or requestNew feature or request
Description
ext-php-rs/crates/cli/src/lib.rs
Line 224 in 060c8bf
| std::fs::copy(&ext_path, &ext_dir).with_context(|| { |
The problem
If you are outside docker and/or don't have permissions to write into PHP's config directory.
cargo php installwill fail if normal user don't have permissions to copy file or write to.inifile.sudo cargo php installis likely to fail withcargo not founderror sincecargois typically installed in user's~/.cargo/bindirectory.sudo ~/.cargo/bin/cargo php installis likely to rebuild and change the owner torootof many intermediate files to make normalcargo bto fail.
Solution: before copying file or editing INI file, check if it requires admin privilege and use sudo2 or elevate crate to escalate privilege.
Metadata
Metadata
Assignees
Labels
cargo-phpRelated to `cargo-php`Related to `cargo-php`enhancementNew feature or requestNew feature or request