harnessed 3.9.3 → 3.9.4

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/dist/cli.mjs CHANGED
@@ -1118,15 +1118,14 @@ async function runAutoInstall(opts) {
1118
1118
  out.skipped.push(check.name);
1119
1119
  continue;
1120
1120
  }
1121
- let chainOk = true;
1121
+ const failureReasons = [];
1122
1122
  for (const cmd of commands) {
1123
1123
  const tokens = cmd.split(/\s+/).filter((t2) => t2.length > 0);
1124
1124
  const exe = tokens[0];
1125
1125
  const args = tokens.slice(1);
1126
1126
  if (exe === void 0) {
1127
- out.failed.push({ name: check.name, reason: `empty command in install_commands` });
1128
- chainOk = false;
1129
- break;
1127
+ failureReasons.push(`empty command in install_commands`);
1128
+ continue;
1130
1129
  }
1131
1130
  const r = spawnSync(exe, args, {
1132
1131
  encoding: "utf8",
@@ -1137,16 +1136,28 @@ async function runAutoInstall(opts) {
1137
1136
  shell: true
1138
1137
  });
1139
1138
  if (r.status !== 0) {
1140
- const reason = r.error !== void 0 ? `spawn error: ${r.error.message}` : `exit code ${r.status ?? "<unknown>"} on \`${cmd}\``;
1141
- out.failed.push({ name: check.name, reason });
1142
- console.error(` \u2717 failed ${check.name} \u2014 ${reason}`);
1143
- chainOk = false;
1144
- break;
1139
+ const reason = r.error !== void 0 ? `spawn error on \`${cmd}\`: ${r.error.message}` : `exit ${r.status ?? "<unknown>"} on \`${cmd}\``;
1140
+ failureReasons.push(reason);
1141
+ console.error(` \u2717 ${cmd} \u2014 ${reason}`);
1145
1142
  }
1146
1143
  }
1147
- if (chainOk) {
1144
+ if (failureReasons.length === 0) {
1148
1145
  out.installed.push(check.name);
1149
1146
  console.log(` \u2713 installed ${check.name}`);
1147
+ } else if (failureReasons.length === commands.length) {
1148
+ out.failed.push({
1149
+ name: check.name,
1150
+ reason: `all commands failed (${failureReasons.length})`
1151
+ });
1152
+ console.error(` \u2717 failed ${check.name} \u2014 all ${commands.length} commands failed`);
1153
+ } else {
1154
+ out.failed.push({
1155
+ name: check.name,
1156
+ reason: `partial: ${failureReasons.length}/${commands.length} commands failed`
1157
+ });
1158
+ console.error(
1159
+ ` \u26A0 ${check.name} \u2014 partial: ${failureReasons.length}/${commands.length} commands failed (others succeeded)`
1160
+ );
1150
1161
  }
1151
1162
  }
1152
1163
  console.log(
@@ -1163,7 +1174,7 @@ var init_auto_install = __esm({
1163
1174
 
1164
1175
  // package.json
1165
1176
  var package_default = {
1166
- version: "3.9.3"};
1177
+ version: "3.9.4"};
1167
1178
 
1168
1179
  // src/manifest/errors.ts
1169
1180
  function instancePathToKeyPath(instancePath) {