Permalink
Browse files

Added ability accept a command line arg for a file name and the abili…

…ty to automatically look for a procfile in the current directory and use it.
  • Loading branch information...
1 parent d7b09a7 commit 5b93c15b993e009af012c8ba25a09fca6f658476 @azare azare committed Feb 24, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 Foreman/frmMain.cs
View
@@ -7,6 +7,7 @@
using System.Text;
using System.Threading;
using System.Windows.Forms;
+using System.IO;
namespace Foreman
{
@@ -18,6 +19,12 @@ public frmMain()
{
InitializeComponent();
this.FormClosing += (s,e) => m_objProcfile.Stop();
+
+ string[] args = Environment.GetCommandLineArgs();
+ if (args.Length > 1 && File.Exists(args[1]))
+ OpenProcfile(args[1]);
+ else if (File.Exists("Procfile"))
+ OpenProcfile("Procfile");
}
private void openProcfileToolStripMenuItem_Click(object sender, EventArgs e)

0 comments on commit 5b93c15

Please sign in to comment.