Skip to content

Commit

Permalink
move ask to loadConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Oct 16, 2023
1 parent 3c91355 commit 23e2f95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 12 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ let
{
echo -e "${chevrons} $*"
}
message_part()
{
echo -n -e "${chevrons} $*"
}
error_message()
{
echo -e "${chevrons} ${color colors.red "\${*}"}"
Expand All @@ -156,6 +160,14 @@ let
error_message $*
exit 1
}
ask() {
setopt local_options no_err_exit no_err_return
local decision=""
message_part "$1 [Yn] "
read -k decision
echo ""
[[ $decision != 'n' ]]
}
'';

in {
Expand Down
7 changes: 0 additions & 7 deletions lib/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
then
die 'Worktree is dirty'
fi
ask() {
echo -n "$chevrons $1 [Yn] "
read -q decision || true
echo ""
[[ $decision != 'n' ]]
}
'';

updateVersions = ''
Expand Down

0 comments on commit 23e2f95

Please sign in to comment.