From af8eae90056575d833751c3ea82a64f2e2fd69e2 Mon Sep 17 00:00:00 2001 From: Willie Date: Fri, 13 Feb 2026 02:05:29 +0800 Subject: [PATCH] fix: skip config loading for audit path mode When `skillshare audit ` targets an existing file or directory, config is not needed. Previously config.Load() ran unconditionally, causing "config not found" errors in CI environments without a skillshare config. Now path mode bypasses config loading entirely. --- cmd/skillshare/audit.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/skillshare/audit.go b/cmd/skillshare/audit.go index 45bcdf217..298da53db 100644 --- a/cmd/skillshare/audit.go +++ b/cmd/skillshare/audit.go @@ -95,7 +95,15 @@ func cmdAudit(args []string) error { cfgPath string ) - if mode == modeProject { + // Path mode: target is an existing file/directory — no config needed. + if opts.Target != "" && pathExists(opts.Target) { + if mode == modeProject { + projectRoot = cwd + cfgPath = config.ProjectConfigPath(cwd) + } else { + cfgPath = config.ConfigPath() + } + } else if mode == modeProject { rt, err := loadProjectRuntime(cwd) if err != nil { return err