Skip to content

Commit

Permalink
Add current version and bin location to --info output (#8168)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
heyimalex authored and andriijas committed Dec 13, 2019
1 parent 8d1a4f2 commit ebcffda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/create-react-app/createReactApp.js
Expand Up @@ -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(
{
Expand Down

0 comments on commit ebcffda

Please sign in to comment.