Skip to content

Commit

Permalink
Fix mint start dependency installation answer detection (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhf authored Nov 22, 2024
1 parent ada378a commit 29eddc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
.vscode
node_modules
coverage
.aider*
.env
6 changes: 4 additions & 2 deletions src/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ module Mint
terminal.puts " ↳ Not all dependencies in your mint.json file are installed."
terminal.puts " Would you like to install them now? (Y/n)"

answer = gets.to_s.downcase
# Accept 'Y', 'y' or empty string (Enter) as affirmative response
# Empty string is treated as 'Y' since Y is the default option
answer = gets.to_s.strip.downcase
terminal.puts AnsiEscapes::Erase.lines(2)

if answer == "y"
if answer.empty? || answer == "y"
Installer.new
break
else
Expand Down

0 comments on commit 29eddc6

Please sign in to comment.