From 7b404f587d7ab3bb1c08dd88e2ee1ffa52131c3d Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Wed, 3 Feb 2021 21:24:53 -0700 Subject: [PATCH] shell: fix formatted files not commited --- shell/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/default.nix b/shell/default.nix index 95395399..9f851245 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -76,7 +76,8 @@ pkgs.devshell.mkShell { all_files=($($diff)) # Format staged nix files. - ${nixpkgs-fmt}/bin/nixpkgs-fmt "${"\${nix_files[@]}"}" + ${nixpkgs-fmt}/bin/nixpkgs-fmt "${"\${nix_files[@]}"}" \ + && git add "${"\${nix_files[@]}"}" # check editorconfig ${editorconfig-checker}/bin/editorconfig-checker -- "${"\${all_files[@]}"}"