feat: deploy: 1 no tty option
This commit is contained in:
@@ -61,6 +61,10 @@ while [ $# -gt 0 ]; do
|
||||
target_host=$2
|
||||
shift 2
|
||||
;;
|
||||
-y|--yes)
|
||||
assume_yes=1
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@@ -187,12 +191,16 @@ if [ "${push_deploy+x}" ]; then
|
||||
if [ "${server_init+x}" ]; then
|
||||
if [ "$is_target_host_nixos" -eq 1 ]; then
|
||||
log warn 'target host already is nixos, are you really want to reinstall nixos?'
|
||||
if [ "${assume_yes+x}" ]; then
|
||||
log info 'assuming yes (-y/--yes), proceeding with reinstall'
|
||||
else
|
||||
printf 'This may delete all data [y/N]\n'
|
||||
read -r CONTINUE
|
||||
if [ "$CONTINUE" != "y" ]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
nixos-anywhere -- $@ # --flake .#x86_64-linux --target-host proxydoe
|
||||
|
||||
Reference in New Issue
Block a user