Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fsi/fsimain.fs
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ let evaluateSession (argv: string[]) =
[<LoaderOptimization(LoaderOptimization.MultiDomainHost)>]
let MainMain argv =
ignore argv
// let _ = Debugger.Launch()
let argv = System.Environment.GetCommandLineArgs()

let timesFlag = argv |> Array.exists (fun x -> x = "/times" || x = "--times")

if timesFlag then
Expand Down
2 changes: 1 addition & 1 deletion tests/FSharp.Test.Utilities/TestFramework.fs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ module Command =

let exec dir envVars (redirect:RedirectInfo) path args =

#if !NETCOREAPP
#if false
let ensureConsole () =
// Set UTF-8 encoding for console input/output to ensure FSI receives UTF-8 data.
// This is needed because on net472 ProcessStartInfo.StandardInputEncoding is unavailable,
Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/scriptlib.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ module Scripting =
| 0 ->
Success(string out)
| errCode ->
System.Environment.FailFast($"Console input encoding is '{System.Console.InputEncoding}'. Child process redirects input? '{p.StartInfo.RedirectStandardInput}'. \r\nStdOut:\r\n{out}\r\n\r\nStdErr:\r\n{err}")
let msg = sprintf "Error running command '%s' with args '%s' in directory '%s'" exePath arguments workDir
ErrorLevel (msg, errCode)

Expand Down Expand Up @@ -207,7 +208,7 @@ module Scripting =
if n > 0 then System.Console.Error.Write(buffer, 0, n)
with _ -> () } |> Async.Start
async { try
while true do
while true do
let c = System.Console.In.ReadLine()
p.StandardInput.WriteLine(c)
with _ -> () } |> Async.Start
Expand Down
Loading