diff --git a/app/index.js b/app/index.js index 596328a6..2e53f3d1 100644 --- a/app/index.js +++ b/app/index.js @@ -1,3 +1,14 @@ +// Print diagnostic information for a few arguments instead of running Hyper. +if (['--help', '-v', '--version'].includes(process.argv[1])) { + const {version} = require('./package'); + const configLocation = process.platform === 'win32' ? process.env.userprofile + '\\.hyper.js' : '~/.hyper.js'; + console.log(`Hyper version ${version}`); + console.log('Hyper does not accept any command line arguments. Please modify the config file instead.'); + console.log(`Hyper configuration file located at: ${configLocation}`); + // eslint-disable-next-line unicorn/no-process-exit + process.exit(); +} + // handle startup squirrel events if (process.platform === 'win32') { // eslint-disable-next-line import/order