Skip to content

Commit

Permalink
ensure that the logger is initialized with correct args before using …
Browse files Browse the repository at this point in the history
…it (fix #2308)
  • Loading branch information
jlipps committed Apr 11, 2014
1 parent 45a2529 commit 4cd36c8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";

var path = require('path')
, gruntHelpers = require('./grunt-helpers.js')
, authorize = gruntHelpers.authorize
Expand Down
1 change: 1 addition & 0 deletions bin/appium-doctor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
"use strict";

var IOSChecker = require('../lib/doctor/ios.js').IOSChecker
, AndroidChecker = require('../lib/doctor/android.js').AndroidChecker
, DevChecker = require('../lib/doctor/dev.js').DevChecker
Expand Down
2 changes: 1 addition & 1 deletion lib/server/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var colors = {
var logger = null;

module.exports.init = function (args) {
var options = _.extend(defaults, {
var options = _.extend(_.clone(defaults), {
timestamp: args.logTimestamp
, handleExceptions: true
, exitOnError: false
Expand Down
2 changes: 1 addition & 1 deletion lib/server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var parser = require('./parser.js')()
, args = null
, fs = require('fs')
, path = require('path')
, isWindows = require('../helpers.js').isWindows()
, _ = require('underscore')
, colors = require('colors');

Expand All @@ -20,6 +19,7 @@ logger = logFactory.get('appium');

var appiumPermStat = fs.statSync(path.resolve(__dirname, '../../package.json'));
var launchCmd = (process.env.SUDO_COMMAND || "").toLowerCase();
var isWindows = require('../helpers.js').isWindows();

if (
!isWindows &&
Expand Down

0 comments on commit 4cd36c8

Please sign in to comment.