Merge pull request #758 from hexid/dotNET-exit-code
Update dotNET executable to return the exit code of the casper instance
Showing
2 changed files
with
3 additions
and
2 deletions
No preview for this file type
... | @@ -97,7 +97,7 @@ class slimerjs : engine { | ... | @@ -97,7 +97,7 @@ class slimerjs : engine { |
97 | } | 97 | } |
98 | 98 | ||
99 | class casperjs { | 99 | class casperjs { |
100 | static void Main(string[] args) { | 100 | static int Main(string[] args) { |
101 | var SUPPORTED_ENGINES = new Dictionary<string, engine> { | 101 | var SUPPORTED_ENGINES = new Dictionary<string, engine> { |
102 | {"phantomjs", new phantomjs()}, | 102 | {"phantomjs", new phantomjs()}, |
103 | {"slimerjs", new slimerjs()} | 103 | {"slimerjs", new slimerjs()} |
... | @@ -167,9 +167,10 @@ class casperjs { | ... | @@ -167,9 +167,10 @@ class casperjs { |
167 | string line = p.StandardOutput.ReadLine(); | 167 | string line = p.StandardOutput.ReadLine(); |
168 | Console.WriteLine(line); | 168 | Console.WriteLine(line); |
169 | } | 169 | } |
170 | return p.ExitCode; | ||
170 | } catch(Win32Exception e) { | 171 | } catch(Win32Exception e) { |
171 | Console.WriteLine("Fatal: " + e.Message + "; did you install " + ENGINE + "?"); | 172 | Console.WriteLine("Fatal: " + e.Message + "; did you install " + ENGINE + "?"); |
172 | Environment.Exit(1); | 173 | return -1; |
173 | } | 174 | } |
174 | } | 175 | } |
175 | } | 176 | } | ... | ... |
-
Please register or sign in to post a comment