digitarald / firewatch

Real-time command-line memory monitor for Firefox OS devices.
40 stars 11 forks source link

p abbreviation is already used for port #11

Closed rhelmer closed 9 years ago

rhelmer commented 10 years ago

Running with a different port e.g. -p 8090 fails with a very strange error message:

path.js:313
        throw new TypeError('Arguments to path.resolve must be strings');
              ^
TypeError: Arguments to path.resolve must be strings
    at Object.exports.resolve (path.js:313:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/firewatch/lib/server.js:75:28)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

This is because the p abbreviation is used both by --port as well as --output-path, and the last one wins.

rhelmer commented 10 years ago

Note that it doesn't fail until you try to hit the port. Also, I can't think of a good abbreviation for --output-path that isn't already used, so I simply removed it.