Permalink
Browse files

Fixed some little bugs to get it working for realz

  • Loading branch information...
1 parent 92969a9 commit e6b17f08e91c4f4452c090b3f8be1b74c332001c @anurse committed Apr 17, 2012
Showing with 11 additions and 3 deletions.
  1. +11 −3 git-credential-winstore/Program.cs
@@ -5,6 +5,8 @@
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
namespace Git.Credential.WinStore
{
@@ -19,6 +21,13 @@ class Program
static void Main(string[] args)
{
+ if (args.Length > 0 && args[0] == "-d")
+ {
+ Console.Error.WriteLine("Launching debugger...");
+ Debugger.Launch();
+ args = args.Skip(1).ToArray();
+ }
+
// Read arguments
IDictionary<string, string> parameters = ReadGitParameters();
@@ -50,9 +59,8 @@ private static void WriteGitParameters(IDictionary<string, string> response)
{
foreach (var pair in response)
{
- Console.WriteLine("{0}={1}", pair.Key, pair.Value);
+ Console.Write("{0}={1}\n", pair.Key, pair.Value);
}
- Console.WriteLine();
}
private static IDictionary<string, string> ReadGitParameters()
@@ -69,7 +77,7 @@ private static void WriteGitParameters(IDictionary<string, string> response)
private static void WriteUsage()
{
- Console.WriteLine("Figure it out yourself. But seriously, I just haven't written this yet. Sorry :(");
+ Console.Error.WriteLine("Figure it out yourself. But seriously, I just haven't written this yet. Sorry :(");
}
static IEnumerable<Tuple<string, string>> GetCommand(IDictionary<string, string> args)

0 comments on commit e6b17f0

Please sign in to comment.