fix: tighten tagged error linting

This commit is contained in:
Aiden Cline 2026-06-23 17:01:06 -05:00
commit bf24cf423c
4 changed files with 140 additions and 49 deletions

View file

@ -11,7 +11,6 @@ import { LayerNode } from "./effect/layer-node"
import { filesystem } from "./effect/layer-node-platform"
import { makeRuntime } from "./effect/runtime"
import { NpmConfig } from "./npm-config"
import { errorMessage } from "./util/error"
export class InstallFailedError extends Schema.TaggedErrorClass<InstallFailedError>()("NpmInstallFailedError", {
add: Schema.Array(Schema.String).pipe(Schema.optional),
@ -19,8 +18,7 @@ export class InstallFailedError extends Schema.TaggedErrorClass<InstallFailedErr
cause: Schema.optional(Schema.Defect()),
}) {
override get message() {
const detail = this.cause === undefined ? undefined : errorMessage(this.cause)
return `Failed to install ${this.add?.join(", ") || "dependencies"} in ${this.dir}${detail ? `: ${detail}` : ""}`
return `Failed to install dependencies in ${this.dir}`
}
}

View file

@ -60,7 +60,7 @@ function isSkillFrontmatter(data: unknown): data is { name: string; description?
export class InvalidError extends Schema.TaggedErrorClass<InvalidError>()("SkillInvalidError", {
path: Schema.String,
message: Schema.optional(Schema.String),
message: Schema.String,
issues: Schema.optional(Schema.Array(Issue)),
}) {}