Date: Mon, 20 Apr 2015 17:30:24 +0200 From: freethread ft <pe.freethread@live.com> To: "mono@freebsd.org" <mono@freebsd.org> Subject: Interactive mode always false Message-ID: <DUB117-W113E4174D215C6F05D5AB682E00@phx.gbl>
next in thread | raw e-mail | index | archive | help
Actually I'm using mono for few simple commands, specifically I use CS-Script (Oleg Shilo www.csscript.net) a wrapper to run C# sources as scripts (compile at run-time). It works, but I'm facing a misbehaviour trying to execute with a process (System.Diagostics.Process) the command 'portsnap fetch' returns error 0x01 and the message:
portsnap fetch should not be run non-interactively.
Run portsnap cron instead.
Then I tested the System.Environment.UserInteractive property both using CS-Script and in an compiled executable, with mcs, the following source
using System;
namespace Prog
{
class Prog
{
public static int Main ()
{
Console.WriteLine ("Environment.UserInteractive = " +
(Environment.UserInteractive ? "true" : "false"));
}
}
}
in both cases (run as script and run compiled) the output is 'false'. Is this a feature or a bug? Actually I cannot test it in Windows, but I guess it should return 'true' if running as compiled executable at least.
Thanks for your time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DUB117-W113E4174D215C6F05D5AB682E00>
