about summary refs log tree commit diff stats
path: root/pkgs/by-name/fu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpkgs/by-name/fu/fupdate-flake/fupdate-flake.sh6
-rw-r--r--pkgs/by-name/fu/fupdate/Cargo.lock16
-rw-r--r--pkgs/by-name/fu/fupdate/Cargo.toml4
-rw-r--r--pkgs/by-name/fu/fupdate/flake.lock6
-rw-r--r--pkgs/by-name/fu/fupdate/src/main.rs20
5 files changed, 30 insertions, 22 deletions
diff --git a/pkgs/by-name/fu/fupdate-flake/fupdate-flake.sh b/pkgs/by-name/fu/fupdate-flake/fupdate-flake.sh
index cee0af98..f63d7de0 100755
--- a/pkgs/by-name/fu/fupdate-flake/fupdate-flake.sh
+++ b/pkgs/by-name/fu/fupdate-flake/fupdate-flake.sh
@@ -6,7 +6,9 @@ info() {
     echo "Info: $1"
 }
 dbg() {
-    [ "${DEBUG_ENABLE-unset}" != "unset" ] && echo "Debug: $1" >&2
+    if [ "${DEBUG_ENABLE-unset}" != "unset" ]; then
+        echo "Debug: $1" >&2
+    fi
 }
 die() {
     echo "Error: $1"
@@ -58,7 +60,7 @@ upfind() {
 get_storage_path() {
     update_script="$(realpath "$1")"
 
-    storage_path="$XDG_DATE_HOME/fupdate-flake/$update_script"
+    storage_path="$XDG_DATA_HOME/fupdate-flake/$update_script"
     echo "$storage_path"
 }
 
diff --git a/pkgs/by-name/fu/fupdate/Cargo.lock b/pkgs/by-name/fu/fupdate/Cargo.lock
index 4b160d08..0e90eb40 100644
--- a/pkgs/by-name/fu/fupdate/Cargo.lock
+++ b/pkgs/by-name/fu/fupdate/Cargo.lock
@@ -54,15 +54,15 @@ dependencies = [
 
 [[package]]
 name = "anyhow"
-version = "1.0.97"
+version = "1.0.98"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
+checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
 
 [[package]]
 name = "clap"
-version = "4.5.35"
+version = "4.5.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944"
+checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071"
 dependencies = [
  "clap_builder",
  "clap_derive",
@@ -70,9 +70,9 @@ dependencies = [
 
 [[package]]
 name = "clap_builder"
-version = "4.5.35"
+version = "4.5.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9"
+checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2"
 dependencies = [
  "anstream",
  "anstyle",
@@ -154,9 +154,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.94"
+version = "1.0.95"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
+checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
 dependencies = [
  "unicode-ident",
 ]
diff --git a/pkgs/by-name/fu/fupdate/Cargo.toml b/pkgs/by-name/fu/fupdate/Cargo.toml
index c86afe2b..c172df8d 100644
--- a/pkgs/by-name/fu/fupdate/Cargo.toml
+++ b/pkgs/by-name/fu/fupdate/Cargo.toml
@@ -6,8 +6,8 @@ edition = "2021"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-anyhow = "1.0.97"
-clap = { version = "4.5.35", features = ["derive"] }
+anyhow = "1.0.98"
+clap = { version = "4.5.37", features = ["derive"] }
 clap_complete = { version = "4.5.47", features = ["unstable-dynamic"] }
 
 [profile.release]
diff --git a/pkgs/by-name/fu/fupdate/flake.lock b/pkgs/by-name/fu/fupdate/flake.lock
index eb3616c8..07eb6b21 100644
--- a/pkgs/by-name/fu/fupdate/flake.lock
+++ b/pkgs/by-name/fu/fupdate/flake.lock
@@ -2,11 +2,11 @@
   "nodes": {
     "nixpkgs": {
       "locked": {
-        "lastModified": 1744096231,
-        "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=",
+        "lastModified": 1745377448,
+        "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b",
+        "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
         "type": "github"
       },
       "original": {
diff --git a/pkgs/by-name/fu/fupdate/src/main.rs b/pkgs/by-name/fu/fupdate/src/main.rs
index 850eaf87..759f65ec 100644
--- a/pkgs/by-name/fu/fupdate/src/main.rs
+++ b/pkgs/by-name/fu/fupdate/src/main.rs
@@ -12,7 +12,7 @@ fn main() -> Result<(), anyhow::Error> {
 
     let args = CliArgs::parse();
 
-    let other = args.command.first().map_or("flake", String::as_str);
+    let command = args.command.first().map_or("flake", String::as_str);
 
     {
         let args = if args.command.len() > 1 {
@@ -21,13 +21,19 @@ fn main() -> Result<(), anyhow::Error> {
             &[]
         };
 
-        let status = Command::new(format!("fupdate-{other}"))
-            .args(args)
-            .status()
-            .with_context(|| format!("Failed to execute `fupdate-{other}`"))?;
+        // println!("Running: `fupdate-{command} {}`", args.join(" "));
 
-        if !status.success() {
-            bail!("Command `fupdate-{other}` failed!");
+        let mut child = Command::new(format!("fupdate-{command}"))
+            .args(args)
+            .spawn()
+            .with_context(|| format!("Failed to spawn `fupdate-{command}`"))?;
+
+        if !child
+            .wait()
+            .with_context(|| format!("Failed to wait for `fupdate-{command}` to finish"))?
+            .success()
+        {
+            bail!("Command `fupdate-{command} {}` failed!", args.join(" "));
         }
     }