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

Commit c197764

Browse files
committed
Get pkg version from package.json
1 parent c21d4cb commit c197764

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { GraphQLClient } from "graphql-request";
33
import ora from "ora";
44
import os from "os";
55
import path from "path";
6+
import pkg from "../package.json";
67
import DefaultTheme from "./install/themes/greenway.theme.json";
78
import ThemeManager from "./ThemeManager";
89

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

0 commit comments

Comments
 (0)