Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 2 commits
  • 3 files changed
  • 1 commit comment
  • 1 contributor
Showing with 9 additions and 4 deletions.
  1. +3 −3 examples/local.js
  2. +1 −1 lib/local/instance.js
  3. +5 −0 lib/local/platform/unix.js
View
6 examples/local.js
@@ -3,16 +3,16 @@ var launch = require('../lib');
launch.local(function(err, launcher) {
// User the launcher api
launcher('http://github.com/ekryski', {
- browser : 'chrome'
+ browser : 'chromium'
}, function(error, worker) {
if(error) {
console.log('Error:', error);
return;
}
- console.log('Launched Safari. Process id:', worker.id);
+ console.log('Launched chromium. Process id:', worker.id);
setTimeout(function() {
worker.stop(function() {
- console.log('Safari stopped');
+ console.log('chromium stopped');
});
}, 10000);
});
View
2 lib/local/instance.js
@@ -4,7 +4,7 @@ var EventEmitter = require('events').EventEmitter;
var getProcessId = function(name, callback) {
// Get the process with the given name if it is running
- exec("ps -clx | grep '" + name + "$' | awk '{print $2}' | head -1", function(err, stdout) {
+ exec("ps ax | grep '" + name + "$' | awk '{print $2}' | head -1", function(err, stdout) {
var pid = stdout.trim();
if(!pid) {
return callback(new Error('There does not seem to be a ' + name + ' process running'));
View
5 lib/local/platform/unix.js
@@ -10,6 +10,11 @@ var supportedBrowsers = exports.supported = [
process : 'chrome'
},
{
+ name : 'chromium',
+ pathQuery : 'which chromium-browser',
+ process : 'chrome'
+ },
+ {
name : 'firefox',
pathQuery : 'which firefox',
process : 'firefox'

Showing you all comments on commits in this comparison.

@ekryski
ekryski commented on d9b9adf Jan 7, 2013

Changing this does indeed work on Linux but breaks stopping an instance on Mac OS X. I'll fix it up this evening.

Something went wrong with that request. Please try again.