making `pijul client` more robust to errors

pmeunier
Jul 5, 2023, 4:12 PM
7GQGVFEANEFOA2S5BVH5SVFLJKSJ3TLYWAEJGIX2TPASFHXGS4JAC

Dependencies

  • [2] FY6SDCTO Readibility improvements in `pijul client`
  • [3] 6ARU5AQ7 Improving the `pijul client` command: printing the URL + styling the page
  • [4] LZOGKBJX new command `pijul client` for authenticating to a HTTP server

Change contents

  • replacement in pijul/src/commands/client.rs at line 81
    [4.7494][4.7494:7541]()
    open::that(&url.to_string())?;
    [4.7494]
    [3.11272]
    open::that(&url.to_string()).unwrap_or(());
  • replacement in pijul/src/commands/client.rs at line 97
    [2.169][4.7994:8060](),[4.7994][4.7994:8060]()
    std::fs::write(&cache_path, &x)?;
    [2.169]
    [4.8060]
    if let Err(e) = std::fs::write(&cache_path, &x) {
    log::debug!("Error while writing file {:?}: {:?}", cache_path, e)
    }