@hcmai/cli 0.3.12 → 0.3.13

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/index.js CHANGED
@@ -8227,10 +8227,21 @@ async function bindEvidenceDirectory(project, reference) {
8227
8227
  }
8228
8228
  const absolute = path8.join(project, relative2);
8229
8229
  await assertNoSymlinkComponents(project, relative2);
8230
- const stat = await fs6.stat(absolute).catch((cause) => {
8231
- throw invalid2(`evidence \u76EE\u5F55\u4E0D\u53EF\u7528\uFF1A${relative2}`, cause);
8232
- });
8233
- if (!stat.isDirectory()) throw invalid2(`evidence \u8DEF\u5F84\u4E0D\u662F\u76EE\u5F55\uFF1A${relative2}`);
8230
+ const stat = await fs6.stat(absolute).catch(() => null);
8231
+ if (stat === null) {
8232
+ await fs6.mkdir(absolute, { recursive: true, mode: 448 }).catch((cause) => {
8233
+ throw invalid2(
8234
+ `evidence \u76EE\u5F55\u5EFA\u4E0D\u51FA\u6765\uFF1A${relative2}\u3002next_step=\u68C0\u67E5\u4E0A\u7EA7\u76EE\u5F55\u6743\u9650\uFF0C\u6216\u6362\u4E00\u4E2A evidence/ \u4E0B\u7684\u8DEF\u5F84`,
8235
+ cause
8236
+ );
8237
+ });
8238
+ return { relative: relative2, absolute };
8239
+ }
8240
+ if (!stat.isDirectory()) {
8241
+ throw invalid2(
8242
+ `evidence \u8DEF\u5F84\u5DF2\u5B58\u5728\u4F46\u4E0D\u662F\u76EE\u5F55\uFF1A${relative2}\u3002next_step=\u6362\u4E00\u4E2A evidence/ \u4E0B\u7684\u76EE\u5F55\u540D`
8243
+ );
8244
+ }
8234
8245
  return { relative: relative2, absolute };
8235
8246
  }
8236
8247
  async function readPlan(project, file) {