pinme 2.0.7-beta.1 → 2.0.7-beta.2

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6203,7 +6203,7 @@ var import_chalk26 = __toESM(require("chalk"));
6203
6203
  var import_figlet5 = __toESM(require("figlet"));
6204
6204
 
6205
6205
  // package.json
6206
- var version = "2.0.7-beta.1";
6206
+ var version = "2.0.7-beta.2";
6207
6207
 
6208
6208
  // bin/upload.ts
6209
6209
  var import_path7 = __toESM(require("path"));
@@ -9295,10 +9295,18 @@ var import_child_process3 = require("child_process");
9295
9295
  function makeTempCacheDir() {
9296
9296
  return import_fs_extra5.default.mkdtempSync(import_path11.default.join(import_os5.default.tmpdir(), "pinme-npm-cache-"));
9297
9297
  }
9298
+ function getNpmCommand() {
9299
+ if (process.platform === "win32") {
9300
+ return "npm.cmd";
9301
+ }
9302
+ return "npm";
9303
+ }
9298
9304
  function runInstall(cwd, cacheDir) {
9299
- (0, import_child_process3.execFileSync)("npm", ["install", "--cache", cacheDir, "--no-audit", "--no-fund"], {
9305
+ const npm = getNpmCommand();
9306
+ const result = (0, import_child_process3.spawnSync)(npm, ["install", "--cache", cacheDir, "--no-audit", "--no-fund"], {
9300
9307
  cwd,
9301
9308
  stdio: "inherit",
9309
+ shell: true,
9302
9310
  env: {
9303
9311
  ...process.env,
9304
9312
  npm_config_cache: cacheDir,
@@ -9306,6 +9314,12 @@ function runInstall(cwd, cacheDir) {
9306
9314
  npm_config_fund: "false"
9307
9315
  }
9308
9316
  });
9317
+ if (result.error) {
9318
+ throw result.error;
9319
+ }
9320
+ if (result.status !== 0) {
9321
+ throw new Error(`npm install failed with exit code ${result.status}`);
9322
+ }
9309
9323
  }
9310
9324
  function installProjectDependencies(cwd) {
9311
9325
  let lastError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinme",
3
- "version": "2.0.7-beta.1",
3
+ "version": "2.0.7-beta.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },