about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/ytc/src/main.rs
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-14 13:25:07 +0100
committerSoispha <soispha@vhack.eu>2024-01-14 13:25:07 +0100
commit2871dfbdb8818b125ade924547d5427b318a54e8 (patch)
tree524e90ca3e3299583ec435c5a384f7fa3652077f /sys/nixpkgs/pkgs/ytc/src/main.rs
parentfix(hm/files): Add manifest.json symlink (diff)
downloadnixos-config-2871dfbdb8818b125ade924547d5427b318a54e8.zip
fix(sys/nixpkgs/ytc): Check if symlink path exists
Diffstat (limited to '')
-rw-r--r--sys/nixpkgs/pkgs/ytc/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nixpkgs/pkgs/ytc/src/main.rs b/sys/nixpkgs/pkgs/ytc/src/main.rs
index 552e85d3..75084851 100644
--- a/sys/nixpkgs/pkgs/ytc/src/main.rs
+++ b/sys/nixpkgs/pkgs/ytc/src/main.rs
@@ -134,9 +134,14 @@ fn main() -> Result<()> {
 
         if status_path()?.is_symlink() {
             fs::remove_file(status_path()?).context("Failed to delete old status file")?;
+        } else if !status_path()?.exists() {
+            debug!(
+                "The status path at '{}' does not exists",
+                status_path()?.display()
+            );
         } else {
             bail!(
-                "The status path ('{}') is not a symlink!",
+                "The status path ('{}') is not a symlink but exists!",
                 status_path()?.display()
             );
         }