From f69de9902d408a93456e890dc74d0e1ba8e88251 Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 29 Mar 2024 23:21:25 +0100 Subject: fix(pkgs/scripts/fupdate): Avoid polluting the arguments of the update script Previously, arguments to fupdate were also passed along to the update script, they should now be filtered out. If passing them along is wanted, they can be put behind a `--`. --- sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/nixpkgs/pkgs') diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh b/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh index 992a451a..c28f363f 100755 --- a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh +++ b/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh @@ -163,6 +163,21 @@ done case "$1" in "flake") shift 1 + + # Filter out fupdate specific flags + while [ "$1" != "--" ]; do + # FIXME: This check allows to add a flag multiple times, but this should probably + # not be allowed <2024-03-29> + case "$1" in + "--no-script" | "-n") + shift 1; + ;; + *) + break; + ;; + esac + done + [ "$1" = "--" ] && shift 1 main "$@" ;; -- cgit 1.4.1