npm-pkgbuild 10.19.9 → 10.19.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "10.19.9",
3
+ "version": "10.19.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -72,7 +72,7 @@ program
72
72
  for (const outputFactory of allOutputs.filter(
73
73
  o => options[o.name] === true || output[o.name] !== undefined
74
74
  )) {
75
- if (options.available && !(await outputFactory.prepare)) {
75
+ if (options.available && !(await outputFactory.prepare(options))) {
76
76
  continute;
77
77
  }
78
78
 
@@ -74,25 +74,28 @@ export class ARCH extends Packager {
74
74
  return fields;
75
75
  }
76
76
 
77
- static async prepare() {
78
- if(_prepared === undefined) {
79
- try {
80
- await execa("makepkg", ["-V"]);
81
-
82
- const cfg = await readFile("/etc/makepkg.conf", utf8StreamOptions);
83
- const i = cfg.indexOf("PKGEXT='");
84
- if (i > 0) {
85
- const m = cfg
86
- .substring(i)
87
- .split(/\n/)[0]
88
- .match(/='([^']+)'/);
89
- _ext = m[1];
77
+ static async prepare(options) {
78
+ if (_prepared === undefined) {
79
+ try {
80
+ await execa("makepkg", ["-V"]);
81
+
82
+ const cfg = await readFile("/etc/makepkg.conf", utf8StreamOptions);
83
+ if(options.verbose) {
84
+ console.log(cfg);
85
+ }
86
+ const i = cfg.indexOf("PKGEXT='");
87
+ if (i > 0) {
88
+ const m = cfg
89
+ .substring(i)
90
+ .split(/\n/)[0]
91
+ .match(/='([^']+)'/);
92
+ _ext = m[1];
93
+ }
94
+ _prepared = true;
95
+ } catch {
96
+ _prepared = false;
90
97
  }
91
- _prepared = true;
92
- } catch {
93
- _prepared = false;
94
98
  }
95
- }
96
99
  return _prepared;
97
100
  }
98
101