From d516870f42244f4cae73ef69e624a543c5d43011 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Fri, 9 Jun 2023 09:48:49 +1200 Subject: [PATCH] nixos/modules: Split recursive mkdir with permissions Detected by ShellCheck as violating . --- nixos/modules/config/shells-environment.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index bc6583442edf..a8476bd2aaed 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -214,7 +214,8 @@ in '' # Create the required /bin/sh symlink; otherwise lots of things # (notably the system() function) won't work. - mkdir -m 0755 -p /bin + mkdir -p /bin + chmod 0755 /bin ln -sfn "${cfg.binsh}" /bin/.sh.tmp mv /bin/.sh.tmp /bin/sh # atomically replace /bin/sh '';