From 27f61f5e1b695a9accb71886f380513e1b0e4ef3 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Mon, 23 Oct 2023 22:32:54 +1100 Subject: [PATCH] flutter: Remove existing .git directories --- pkgs/development/compilers/flutter/flutter.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index befff3516b89..45e50e50d821 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -47,14 +47,13 @@ let # The flutter_tools package tries to run many Git commands. In most # cases, unexpected output is handled gracefully, but commands are never # expected to fail completely. A blank repository needs to be created. - if [ ! -d .git ]; then - git init -b nixpkgs - GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \ - GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \ - GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \ - git commit --allow-empty -m "Initial commit" - (. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .) - fi + rm -rf .git # Remove any existing Git directory + git init -b nixpkgs + GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \ + GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \ + GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \ + git commit --allow-empty -m "Initial commit" + (. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .) mkdir -p bin/cache