mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 22:46:30 +08:00
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:
committed by
Andreas Cederström
parent
8d1a4f2fce
commit
ebcffdacdc
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user