Add current version and bin location to --info output (#8168)

Make the --info subcommand outuput the current version information and the location of the file being run. Our issue template tells users to provide the output of --info, so having the current version is incredibly helpful, especially since it doesn't necessarily match the globally installed version that envinfo outputs. Knowing the location helps us determine whether the running bin is globally installed or in the local node_modules.
This commit is contained in:
Alex Guerra
2019-12-13 03:56:48 -06:00
committed by Andreas Cederström
parent 8d1a4f2fce
commit ebcffdacdc

View File

@@ -156,6 +156,10 @@ const program = new commander.Command(packageJson.name)
if (program.info) {
console.log(chalk.bold('\nEnvironment Info:'));
console.log(
`\n current version of ${packageJson.name}: ${packageJson.version}`
);
console.log(` running from ${__dirname}`);
return envinfo
.run(
{