Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Accept command line arguments for PROCFILE #7

Merged
merged 1 commit into from about 2 years ago

2 participants

Erik Azar David Dollar
Erik Azar

I added the ability to 1) accept a command line argument for the filename to open. 2) if an arg isn't specified it will look in the local directory for a file named 'procfile' and use that.

...to automatically look for a procfile in the current directory and use it.

Erik Azar 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.
5b93c15
David Dollar ddollar merged commit 29db39a into from February 24, 2012
David Dollar ddollar closed this February 24, 2012
David Dollar
Owner

Thanks for the pull request. I'm not really maintaining this any more as I have gotten the CLI foreman working on Windows.

If you're interested in taking it over I'd be happy to give you a commit bit or point my fork at yours.

Erik Azar

Thanks David. We tried using the CLI on Windows yesterday and it would just hang when we started it. We'd much rather have a CLI version as well. We installed the gem file so I don't know if that has your fixes in it for Windows or not.
Would you recommend I pull from Github or should the gem be current?

David Dollar
Owner

The gem should be current. If you file an issue on the foreman gem here with your Procfile and show the output of running each command individually I can try to dig in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 24, 2012
Erik Azar 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.
5b93c15
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  Foreman/frmMain.cs
7  Foreman/frmMain.cs
@@ -7,6 +7,7 @@
7 7
 using System.Text;
8 8
 using System.Threading;
9 9
 using System.Windows.Forms;
  10
+using System.IO;
10 11
 
11 12
 namespace Foreman
12 13
 {
@@ -18,6 +19,12 @@ public frmMain()
18 19
         {
19 20
             InitializeComponent();
20 21
             this.FormClosing += (s,e) => m_objProcfile.Stop();
  22
+
  23
+            string[] args = Environment.GetCommandLineArgs();
  24
+            if (args.Length > 1 && File.Exists(args[1]))
  25
+                OpenProcfile(args[1]);
  26
+            else if (File.Exists("Procfile"))
  27
+                OpenProcfile("Procfile");
21 28
         }
22 29
 
23 30
         private void openProcfileToolStripMenuItem_Click(object sender, EventArgs e)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.