@talex-touch/utils 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,11 +11,17 @@ export function checkGlobalPackageExist(packageName: string) {
11
11
  return new Promise((resolve, reject) => {
12
12
  exec(`npm list -g ${packageName}`, (error, stdout, stderr) => {
13
13
  if (error) {
14
- reject(error);
14
+ reject({
15
+ exits: false,
16
+ error: error
17
+ });
15
18
  return;
16
19
  }
17
20
  if (stderr) {
18
- reject(stderr);
21
+ reject({
22
+ exits: false,
23
+ error: stderr
24
+ });
19
25
  return;
20
26
  }
21
27
 
@@ -33,7 +39,7 @@ export function checkGlobalPackageExist(packageName: string) {
33
39
 
34
40
  resolve({
35
41
  exist: false
36
- }
42
+ })
37
43
 
38
44
  });
39
45
  })
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "module": "./index.ts",
6
6
  "license": "MPL-2.0",
7
7
  "private": false,
8
- "version": "1.0.11",
8
+ "version": "1.0.12",
9
9
  "scripts": {
10
10
  "publish": "npm publish --access public"
11
11
  },