Swift REPL can't readLine() #5957

Closed
opened 2026-01-31 00:26:28 +00:00 by claunia · 2 comments
Owner

Originally created by @Eddy-Barraud on GitHub (Jan 15, 2020).

Environment

Windows build number: 10.0.19541.0
Windows Terminal version : 0.7.3451.0

Steps to reproduce

root@EDDY:/mnt/c/Users/eddyb# swift
Welcome to Swift version 5.1.3 (swift-5.1.3-RELEASE).
Type :help for assistance.
  1> var test = readLine()
the text
Not working when I press ENTER
have to do Ctrl + Z
^Z
[1]+  Stopped                 swift

Expected behavior

Should read my input

Actual behavior

I can't use readLines() functions, any idea why ?
Thx

Originally created by @Eddy-Barraud on GitHub (Jan 15, 2020). # Environment ```none Windows build number: 10.0.19541.0 Windows Terminal version : 0.7.3451.0 ``` # Steps to reproduce ``` root@EDDY:/mnt/c/Users/eddyb# swift Welcome to Swift version 5.1.3 (swift-5.1.3-RELEASE). Type :help for assistance. 1> var test = readLine() the text Not working when I press ENTER have to do Ctrl + Z ^Z [1]+ Stopped swift ``` # Expected behavior Should read my input # Actual behavior I can't use readLines() functions, any idea why ? Thx
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 00:26:28 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 23, 2020):

Does this reproduce outside of Windows Terminal?

@DHowett-MSFT commented on GitHub (Jan 23, 2020): Does this reproduce outside of Windows Terminal?
Author
Owner

@Eddy-Barraud commented on GitHub (Jan 25, 2020):

Yes, so I alternatively launch swift with a file as argument and now readLine() works. Maybe it's a problem from Swift ...

@Eddy-Barraud commented on GitHub (Jan 25, 2020): Yes, so I alternatively launch swift with a file as argument and now readLine() works. Maybe it's a problem from Swift ...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5957