mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
fix: skip config loading for audit path mode
When `skillshare audit <path>` 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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user