You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found package reference: C:\code\scriptcs\samples\servicestackhost\packages\ServiceStack.3.9.37\lib\net35
Found package reference: C:\code\scriptcs\samples\servicestackhost\packages\ServiceStack.Common.3.9.37\lib\net35
Found package reference: C:\code\scriptcs\samples\servicestackhost\packages\ServiceStack.Redis.3.9.37\lib\net35
Found package reference: C:\code\scriptcs\samples\servicestackhost\packages\ServiceStack.Text.3.9.37\lib\net35
listening on http://*:999/
Unhandled Exception: System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read.
at System.Console.ReadKey(Boolean intercept)
at Submission#0..ctor(Session session, Object& submissionResult)
at Submission#0.<Factory>(Session session)
at Roslyn.Scripting.CommonScriptEngine.Execute[T](String code, String path, DiagnosticBag diagnostics, Session session, Boolean isInteractive)
at Roslyn.Scripting.Session.Execute(String code)
at ScriptCs.Wrappers.SessionWrapper.Execute(String code) in c:\code\scriptcs\src\ScriptCs.Core\Wrappers\SessionWrapper.cs:line 17
at ScriptCs.ScriptExecutor.Execute(String script, IEnumerable`1 paths, IEnumerable`1 scriptPacks) in c:\code\scriptcs\src\ScriptCs.Core\ScriptExecutor.cs:line 47
at ScriptCs.Program.Main(String[] args) in c:\code\scriptcs\src\ScriptCs\Program.cs:line 28
[Finished in 10.6s]
Looks like a buffer needs to be passed the process.
The text was updated successfully, but these errors were encountered:
I think there are some limitations to setting stdin to build-processes in Sublime Text. However, this plug-in - https://github.com/eric-wieser/build-with-input - enables build with input. I will try the plugin in conjunction with scriptcs some time this week and see if it is doable.
For REPL-style programming (or scripts where you need input) Sublime-REPL is commonly used.
I think there are some limitations to setting stdin to build-processes in
Sublime Text. However, this plug-in - https://github.com/eric-wieser/build-with-input - enables build with
input. I will try the plugin in conjunction with scriptcs some time this
week and see if it is doable.
For REPL-style programming (or scripts where you need input) Sublime-REPL
is commonly used.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-14687768
.
I tried the build-with-input pligin, and it works for Console.ReadLine() and Console.Read(), but not Console.ReadKey() - I still get the exception you reported.
I do think this is a limitation to the build system in Sublime Text. I will investigate further when I find time to see if this has been solved in other, more popular language plugins (such as Ruby).
Looks like a buffer needs to be passed the process.
The text was updated successfully, but these errors were encountered: