Skip to content

Commit

Permalink
[feat] remove -t parameter and replace it with a check of whether it'…
Browse files Browse the repository at this point in the history
…s tty
  • Loading branch information
MangoIV authored and mergify[bot] committed Jan 7, 2024
1 parent 2facb63 commit 4c94cec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 0 additions & 3 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ Options:
* -s, --store-paths <disko-script> <nixos-system>
set the store paths to the disko-script and nixos-system directly
if this is give, flake is not needed
* -t --tty
Force pseudo-terminal allocation in SSH sessions. Use this when you expect e.g.
to be asked for password entry during LUKS configuration.
* --no-reboot
do not reboot after installation, allowing further customization of the target installation.
* --kexec <path>
Expand Down
11 changes: 6 additions & 5 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ Options:
* -s, --store-paths <disko-script> <nixos-system>
set the store paths to the disko-script and nixos-system directly
if this is give, flake is not needed
* -t --tty
Force pseudo-terminal allocation in SSH sessions. Use this when you expect e.g.
to be asked for password entry during LUKS configuration.
* --no-reboot
do not reboot after installation, allowing further customization of the target installation.
* --kexec <path>
Expand Down Expand Up @@ -71,7 +68,11 @@ nix_options=(
)
substitute_on_destination=y
ssh_private_key_file=
ssh_tty_param="-T"
if [ -t 0 ]; then # stdin is a tty, we allow interactive input to ssh i.e. passwords
ssh_tty_param="-t"
else
ssh_tty_param="-T"
fi
post_kexec_ssh_port=22

declare -A disk_encryption_keys
Expand Down Expand Up @@ -107,7 +108,7 @@ while [[ $# -gt 0 ]]; do
shift
;;
-t | --tty)
ssh_tty_param="-t"
echo "the '$1' flag is deprecated, a tty is now detected automatically" >&2
;;
--help)
showUsage
Expand Down

0 comments on commit 4c94cec

Please sign in to comment.