Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(configParser): load coffee and typescript for child processes
Browse files Browse the repository at this point in the history
Without loading coffee in configParser.js, child processes which
try and load a coffeescript config file do not have coffee
registered with node's required, and child tests fail.

Fixes an issue with using coffeescript config files.
  • Loading branch information
Nick Radford authored and juliemr committed Feb 21, 2014
1 parent 794e099 commit b6df2cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@
*/
'use strict';

// Coffee is required here to enable config files written in coffee-script.
// It's not directly used in this file, and not required.
try {
require('coffee-script').register();
} catch (e) {
// Intentionally blank - ignore if coffee-script is not available.
}

// LiveScript is required here to enable config files written in LiveScript.
// It's not directly used in this file, and not required.
try {
require('LiveScript');
} catch (e) {
// Intentionally blank - ignore if LiveScript is not available.
}

var util = require('util');
var path = require('path');
var child = require('child_process');
Expand Down
13 changes: 13 additions & 0 deletions lib/configParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ var path = require('path'),
util = require('util'),
protractor = require('./protractor.js');

// Coffee is required here to enable config files written in coffee-script.
try {
require('coffee-script').register();
} catch (e) {
// Intentionally blank - ignore if coffee-script is not available.
}

// LiveScript is required here to enable config files written in LiveScript.
try {
require('LiveScript');
} catch (e) {
// Intentionally blank - ignore if LiveScript is not available.
}

module.exports = ConfigParser = function() {
// Default configuration.
Expand Down

3 comments on commit b6df2cf

@nickradford
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😦 I just realized I committed with the wrong github email address - any idea how to fix that?

@juliemr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, since it's in the commit history now, I think that would require rebasing, which I'd prefer to avoid (http://git-scm.com/book/en/Git-Branching-Rebasing#The-Perils-of-Rebasing). How much of a necessity is this for you?

@nickradford
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a necessity, mostly vanity ;) I'll just be sure to not mess up any further commits :)

Thanks for the quick turnaround here!

Please sign in to comment.