JohnSundell / Marathon

[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
MIT License
1.86k stars 78 forks source link

Unable to run when script uses readLine() #112

Open clayellis opened 7 years ago

clayellis commented 7 years ago

Marathon seems unable to run scripts that make use of readLine().

Steps to reproduce:

  1. marathon create GetInput "import Foundation; print(\"Enter something\"); let result = readLine(); print(result)"
  2. marathon run GetInput

Marathon will then hang indefinitely without even printing Enter something. However, if you navigate to the cache location and build/run the script there, everything works as expected.

JohnSundell commented 7 years ago

@clayellis sorry for the slow response 😞 This is because of a limitation of ShellOut, that it currently only operates synchronously. This is definitely something that I want to fix, since some new tools that I'm working on that require user input are also blocked by this. Hopefully I (or someone else 😇) can get around to fixing it soon.

ghost commented 6 years ago

I'm looking forward to this to! So I made ShellOut asynchronous here