From 4b2b6fa11152e26a6c0d6626fc6c9f0eeaa037e0 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Mon, 30 Jan 2023 14:37:15 -0700 Subject: [PATCH] Simplify removal of trailing spaces --- modules/age.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/age.nix b/modules/age.nix index e3ca0b2..701e101 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -23,9 +23,7 @@ with lib; let if isDarwin then '' if ! diskutil info "${cfg.secretsMountPoint}" &> /dev/null; then - dev=$(diskutil image attach -mountPolicy=noMount ram://1MiB) - # Remove trailing tabs - dev=''${dev%%[[:space:]]*} + dev=$(diskutil image attach -mountPolicy=noMount ram://1MiB | sed 's/[[:space:]]*$//') newfs_hfs -v agenix "$dev" mount -t hfs -o nobrowse,nodev,nosuid,-m=0751 "$dev" "${cfg.secretsMountPoint}" fi