capistrano / capistrano/capistrano

[Windows][Git Bash] `ask` never asks for user input

Open
#2,042 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

# Tasks

```rake
namespace :app do
desc "Confirmation"
task :confirmation do
puts <<-WARN
========================================================================
WARNING: You're about to deploy the branch...
#{fetch(:branch)}
========================================================================
Are you sure you want to continue? (y/N)
WARN
ask :value, "N"

if fetch(:value) !~ /^y(es)?$/i
puts "\nDeploy cancelled!"
exit
end
end
end
```

### Expected behavior

When using `ask` ([offcial documentation](https://capistranorb.com/documentation/getting-started/user-input/)), the console should wait for user input.

### Actual behavior

**On Git Bash (Windows)**, When using `ask` ([offcial documentation](https://capistranorb.com/documentation/getting-started/user-input/)) to get user input, the console never stops and automatically uses the default value.

### System configuration

- Windows 10
- **Terminal app: [Git Bash](https://gitforwindows.org/)**

```
$ cap staging doctor

Environment
Ruby ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
Rubygems 3.0.6
Bundler N/A
Command D:/ProgramFiles/Ruby24-x64/bin/cap staging doctor

Gems
capistrano 3.11.2
airbrussh 1.4.0
rake 13.0.0 (update available)
sshkit 1.20.0
net-ssh 5.2.0
capistrano-composer 0.0.6
capistrano-file-permissions 1.0.0
capistrano-symfony 2.0.0.pre.alfa2
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided `cap staging doctor` command on Windows 10 using Git Bash, starting from the `ask` entry point and the linked user-input documentation. Trace why the prompt immediately accepts its default value; done means the console waits for input and honors the entered response without regressing normal confirmation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, ruby
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.