{"action":"created","issue":{"url":"https://api.github.com/repos/fsharp/FAKE/issues/1355","repository_url":"https://api.github.com/repos/fsharp/FAKE","labels_url":"https://api.github.com/repos/fsharp/FAKE/issues/1355/labels{/name}","comments_url":"https://api.github.com/repos/fsharp/FAKE/issues/1355/comments","events_url":"https://api.github.com/repos/fsharp/FAKE/issues/1355/events","html_url":"https://github.com/fsharp/FAKE/issues/1355","id":170935850,"number":1355,"title":"System.ArgumentNullException thrown for colored console output on Mono","user":{"login":"Dzoukr","id":851307,"avatar_url":"https://avatars.githubusercontent.com/u/851307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dzoukr","html_url":"https://github.com/Dzoukr","followers_url":"https://api.github.com/users/Dzoukr/followers","following_url":"https://api.github.com/users/Dzoukr/following{/other_user}","gists_url":"https://api.github.com/users/Dzoukr/gists{/gist_id}","starred_url":"https://api.github.com/users/Dzoukr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dzoukr/subscriptions","organizations_url":"https://api.github.com/users/Dzoukr/orgs","repos_url":"https://api.github.com/users/Dzoukr/repos","events_url":"https://api.github.com/users/Dzoukr/events{/privacy}","received_events_url":"https://api.github.com/users/Dzoukr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-12T18:53:52Z","updated_at":"2016-08-22T13:38:59Z","closed_at":null,"body":"Ok, this is not actually FAKE`s fault, but right now I do not know where to put this important information, which could save few hours for other developer. Please, take this as something worth documenting (i can send PR, if you would hint me where to put this information):\r\n\r\nWhen running FAKE on Mono (version 4.4.2) on Ubuntu 12.04/14.04, this error occures:\r\n\r\n```\r\nUnhandled Exception:\r\nSystem.ArgumentNullException: Value cannot be null.\r\nParameter name: format\r\n  at System.ParameterizedStrings.Evaluate (System.String format, FormatParam[] args) <0x7f0d4902ab20 + 0x001e7> in <filename unknown>:0 \r\n  at System.TermInfoDriver.ChangeColor (System.String format, ConsoleColor color) <0x7f0d490256b0 + 0x0010e> in <filename unknown>:0 \r\n  at System.TermInfoDriver.set_ForegroundColor (ConsoleColor value) <0x7f0d490258b0 + 0x00037> in <filename unknown>:0 \r\n  at System.ConsoleDriver.set_ForegroundColor (ConsoleColor value) <0x7f0d490136e0 + 0x00048> in <filename unknown>:0 \r\n  at System.Console.set_ForegroundColor (ConsoleColor value) <0x7f0d49012830 + 0x0000c> in <filename unknown>:0 \r\n  at Fake.TraceListener+ConsoleTraceListener.writeText (Boolean toStdErr, ConsoleColor color, Boolean newLine, System.String text) <0x407f35e0 + 0x00052> in <filename unknown>:0 \r\n  at Fake.TraceListener+ConsoleTraceListener.Fake-TraceListener-ITraceListener-Write (Fake.TraceData msg) <0x40216dc0 + 0x000bc> in <filename unknown>:0 \r\n  at Fake.TraceListener+postMessage@148.Invoke (ITraceListener obj) <0x40216d90 + 0x00025> in <filename unknown>:0 \r\n  at System.Collections.Generic.List`1[T].ForEach (System.Action`1 action) <0x7f0d48cdf440 + 0x0007e> in <filename unknown>:0 \r\n  at Fake.TraceListener.postMessage (Fake.TraceData x) <0x40216c40 + 0x0010c> in <filename unknown>:0 \r\n  at <StartupCode$FAKE>.$Program.main@ () <0x40184d90 + 0x01171> in <filename unknown>:0 \r\n```\r\n\r\nTo fix this, you **have to set environment property** `SET TERM=xterm-color` ! After setting this, everything works great.\r\n\r\nMaybe this environment property could be auto-set by FAKE when running on Mono (just idea)."},"comment":{"url":"https://api.github.com/repos/fsharp/FAKE/issues/comments/241414999","html_url":"https://github.com/fsharp/FAKE/issues/1355#issuecomment-241414999","issue_url":"https://api.github.com/repos/fsharp/FAKE/issues/1355","id":241414999,"user":{"login":"Dzoukr","id":851307,"avatar_url":"https://avatars.githubusercontent.com/u/851307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dzoukr","html_url":"https://github.com/Dzoukr","followers_url":"https://api.github.com/users/Dzoukr/followers","following_url":"https://api.github.com/users/Dzoukr/following{/other_user}","gists_url":"https://api.github.com/users/Dzoukr/gists{/gist_id}","starred_url":"https://api.github.com/users/Dzoukr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dzoukr/subscriptions","organizations_url":"https://api.github.com/users/Dzoukr/orgs","repos_url":"https://api.github.com/users/Dzoukr/repos","events_url":"https://api.github.com/users/Dzoukr/events{/privacy}","received_events_url":"https://api.github.com/users/Dzoukr/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T13:38:59Z","updated_at":"2016-08-22T13:38:59Z","body":"Well, after two accepted PRs #1355 and #1363 , I am quite desparate. Setting property on CI (ubuntu) servers still doesn´t work properly. When I try test like this:\r\n\r\n```fsharp\r\nTarget \"TestMono\" (fun _ ->\r\n    tracefn \"MONO IS %b\" EnvironmentHelper.isMono\r\n    tracefn \"UNIX IS %b\" EnvironmentHelper.isUnix\r\n    tracefn \"TERM = %s\" <| System.Environment.GetEnvironmentVariable(\"TERM\")\r\n)\r\n```\r\n\r\nTERM property is set ok (inside TestMono Target) to `xterm-256color` (as it should by PR), BUT it seems like this property is set **after** first usage of `System.TermInfoDriver.ChangeColor`, so this test actually fails (I had to pre-set ENV variable with `xterm-color` to run it) . Maybe I can`t see something completely obvious? @forki / @rmunn do you have any idea?"}}
{"actor":{"display_login":"Dzoukr"}}