mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2026-08-17 08:02:49 +01:00
Updated justfile
This commit is contained in:
@@ -39,6 +39,20 @@ commit-lock:
|
||||
|
||||
# Sync git and update flake inputs (override with git=false or flake=false)
|
||||
prebuild:
|
||||
@if [ -n "$(git ls-files --others --exclude-standard)" ]; then \
|
||||
echo "⚠️ WARNING: You have untracked files in your repository."; \
|
||||
echo "Nix flakes cannot see untracked files. They will not be included in this build."; \
|
||||
echo "The untracked files are:"; \
|
||||
git ls-files --others --exclude-standard; \
|
||||
echo ""; \
|
||||
read -p "Do you want to run 'git add -A' before building? (y/N) " choice; \
|
||||
if [[ "$choice" == [Yy]* ]]; then \
|
||||
echo ">> Staging files..."; \
|
||||
git add -A; \
|
||||
else \
|
||||
echo ">> Proceeding without staging. Untracked files will be ignored by Nix."; \
|
||||
fi; \
|
||||
fi
|
||||
@if [ "{{git}}" == "true" ]; then \
|
||||
echo ">> Syncing Git..."; \
|
||||
just _git-sync; \
|
||||
|
||||
Reference in New Issue
Block a user