Move `pijul_config::shell_cmd` to `pijul_remote`

finchie
Jul 27, 2025, 3:09 PM
EJTDPXGX43IX7ABM6HQ45HCGX72JDBOJ44WNR4KZISLTWWKNGWWAC

Dependencies

  • [2] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [3] VL7ZYKHB Running hooks through shell on Windows and Unix
  • [4] H4AU6QRP New config for HTTP remotes
  • [5] LZOGKBJX new command `pijul client` for authenticating to a HTTP server
  • [6] MJ5K6HRE 🩹 Suppress async fn in trait warning
  • [7] Z4PPQZUG Refactor `pijul-config` to support layered configuration
  • [8] YW6NICQV Migrate codebase to refactored `pijul_config` crate
  • [9] HGJETVAN Create `pijul_config::global_config_directory()`
  • [10] EVDH2ECT Migrate from `pijul::identity` to `pijul_identity`
  • [11] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [12] Y6EVFMTA Don't output files if they aren't in the current channel
  • [13] FVQYZQFL Create dialoguer themes based on global config
  • [14] VQPAUKBQ channel switch as an alias to reset

Change contents

  • edit in pijul-remote/src/lib.rs at line 17
    [8.1130][8.1130:1159]()
    use pijul_config::shell_cmd;
  • edit in pijul-remote/src/lib.rs at line 113
    [2.53370]
    [6.0]
    fn shell_cmd(s: &str) -> Result<String, anyhow::Error> {
    let out = if cfg!(target_os = "windows") {
    std::process::Command::new("cmd")
    .args(&["/C", s])
    .output()
    .expect("failed to execute process")
    } else {
    std::process::Command::new(std::env::var("SHELL").unwrap_or("sh".to_string()))
    .arg("-c")
    .arg(s)
    .output()
    .expect("failed to execute process")
    };
    Ok(String::from_utf8(out.stdout)?.trim().to_string())
    }
  • edit in pijul-config/src/lib.rs at line 225
    [9.1775][3.214:217](),[7.8427][3.214:217](),[3.214][3.214:217](),[3.217][4.4337:4809](),[4.4809][5.4283:4341]()
    }
    pub fn shell_cmd(s: &str) -> Result<String, anyhow::Error> {
    let out = if cfg!(target_os = "windows") {
    std::process::Command::new("cmd")
    .args(&["/C", s])
    .output()
    .expect("failed to execute process")
    } else {
    std::process::Command::new(std::env::var("SHELL").unwrap_or("sh".to_string()))
    .arg("-c")
    .arg(s)
    .output()
    .expect("failed to execute process")
    };
    Ok(String::from_utf8(out.stdout)?.trim().to_string())