Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Stop running cli on import. This makes it untestable. #815

Merged
merged 1 commit into from
Nov 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bin/mojito
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
var resolve = require('path').resolve,
var cli,
resolve = require('path').resolve,
mojito = require(resolve(__dirname, '../lib/mojito'));

mojito.include('management/cli');
cli = mojito.include('management/cli');
cli.run();
5 changes: 1 addition & 4 deletions lib/management/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,4 @@ function main() {
});
}

// Execute the main() function. Note that this occurs as part of the
// require/import process so simply importing/require()ing the cli.js will cause
// the main() operation to be invoked.
main();
exports.run = main;