Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Get pkg version from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ediardo committed Jul 16, 2020
1 parent c21d4cb commit c197764
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GraphQLClient } from "graphql-request";
import ora from "ora";
import os from "os";
import path from "path";
import pkg from "../package.json";
import DefaultTheme from "./install/themes/greenway.theme.json";
import ThemeManager from "./ThemeManager";

Expand Down Expand Up @@ -48,7 +49,7 @@ export default abstract class CLI {
this.OS_USERNAME = os.userInfo().username;
this.NODE_VERSION = process.versions.node;
this.NODE_PATH = process.env.NODE;
this.PKG_VERSION = process.env.npm_package_version || "unknown";
this.PKG_VERSION = pkg.version || "unknown";
this.LANG = process.env.LANG;
this.KMDR_PATH = path.join(this.OS_HOME_PATH, ".kmdr");
this.KMDR_AUTH_FILE = path.join(this.KMDR_PATH, "auth");
Expand Down

0 comments on commit c197764

Please sign in to comment.