about summary refs log tree commit diff stats
path: root/pkgs/by-name/fu
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/fu')
-rwxr-xr-xpkgs/by-name/fu/fupdate-flake/fupdate-flake.sh6
-rw-r--r--pkgs/by-name/fu/fupdate/Cargo.lock12
-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, 28 insertions, 20 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..0fe25d12 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.36"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944"
+checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04"
 dependencies = [
  "clap_builder",
  "clap_derive",
@@ -70,9 +70,9 @@ dependencies = [
 
 [[package]]
 name = "clap_builder"
-version = "4.5.35"
+version = "4.5.36"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9"
+checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5"
 dependencies = [
  "anstream",
  "anstyle",
diff --git a/pkgs/by-name/fu/fupdate/Cargo.toml b/pkgs/by-name/fu/fupdate/Cargo.toml
index c86afe2b..20aab801 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.36", 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..d5cbe443 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": 1744536153,
+        "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b",
+        "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
         "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(" "));
         }
     }