--- a/trunk/cforge/cforge/Program.cs +++ b/trunk/cforge/cforge/Program.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reflection; using System.Text; @@ -43,9 +44,31 @@ s = System.Uri.UnescapeDataString(s); newargs.Add(s); } + + if(Helper.EasyAttachEnabled()) + { + Console.WriteLine("converting arguments from: "); + foreach (String s in args) + { + Console.WriteLine(s); + } + Console.WriteLine("to: "); + foreach (String s in newargs) + { + Console.WriteLine(s); + } + + } + args = newargs.ToArray(); } - + + if (Helper.EasyAttachEnabled()) + { + Console.WriteLine("CWD: " + Directory.GetCurrentDirectory()); + Console.WriteLine("User elevated: " + Helper.IsUserElevated()); + } + if (!Helper.CheckRegistryProtocol()) { @@ -102,6 +125,10 @@ break; default: + if (Helper.EasyAttachEnabled()) + { + Console.WriteLine("default case: " + args[i]); + } // check if we have matching script: if (args[i].StartsWith("--")) { @@ -109,7 +136,6 @@ if (liScripts.Contains(command)) { // the rest of the command is passed as argument to the script - string[] newargs = args.Skip(i + 1).ToArray(); Helper.ExecuteIPyScript(command, newargs, bDebug); @@ -118,6 +144,10 @@ } else { + if (Helper.EasyAttachEnabled()) + { + Console.WriteLine("no matching script found: " + command); + } ShowUsage(); } }