Fix compilation errors for development commands

- Fix feature gate placement for development commands
- Make struct definitions always available, only gate implementations
- Fix Self constructor usage in unit structs
- Ensure development commands compile without development feature enabled
- Fix CLI argument handling for development commands
- Project now compiles successfully in CI/CD environment
This commit is contained in:
robojerk 2025-08-18 11:53:14 -07:00
parent 3dec23f8f7
commit 45b319046f
5 changed files with 137 additions and 130 deletions

View file

@ -9,21 +9,16 @@ use std::path::Path;
use std::process::Command as ProcessCommand;
use std::os::unix::fs::PermissionsExt;
#[cfg(feature = "development")]
// TODO: Re-enable when implementing real file operations
// use {
// cap_std::fs::Dir,
// cap_std_ext::cap_tempfile,
// };
/// Internals command - Internal system commands for advanced operations
pub struct InternalsCommand;
impl InternalsCommand {
pub fn new() -> Self {
Self
InternalsCommand
}
}
#[cfg(feature = "development")]
impl Command for InternalsCommand {
fn execute(&self, args: &[String]) -> AptOstreeResult<()> {
if args.is_empty() || args.contains(&"--help".to_string()) || args.contains(&"-h".to_string()) {