fix(cli): make linter happy

This commit is contained in:
Ruslan Semagin 2026-02-23 12:43:57 +03:00
parent abce553fb8
commit 6f6bc7f07d
2 changed files with 4 additions and 4 deletions

View file

@ -48,7 +48,7 @@ func authLoginOpenAI(useDeviceCode bool) error {
return fmt.Errorf("login failed: %w", err) return fmt.Errorf("login failed: %w", err)
} }
if err := auth.SetCredential("openai", cred); err != nil { if err = auth.SetCredential("openai", cred); err != nil {
return fmt.Errorf("failed to save credentials: %w", err) return fmt.Errorf("failed to save credentials: %w", err)
} }
@ -199,7 +199,7 @@ func authLoginPasteToken(provider string) error {
return fmt.Errorf("login failed: %w", err) return fmt.Errorf("login failed: %w", err)
} }
if err := auth.SetCredential(provider, cred); err != nil { if err = auth.SetCredential(provider, cred); err != nil {
return fmt.Errorf("failed to save credentials: %w", err) return fmt.Errorf("failed to save credentials: %w", err)
} }

View file

@ -75,14 +75,14 @@ func skillsInstallFromRegistry(cfg *config.Config, registryName, slug string) er
workspace := cfg.WorkspacePath() workspace := cfg.WorkspacePath()
targetDir := filepath.Join(workspace, "skills", slug) targetDir := filepath.Join(workspace, "skills", slug)
if _, err := os.Stat(targetDir); err == nil { if _, err = os.Stat(targetDir); err == nil {
return fmt.Errorf("\u2717 skill '%s' already installed at %s", slug, targetDir) return fmt.Errorf("\u2717 skill '%s' already installed at %s", slug, targetDir)
} }
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel() defer cancel()
if err := os.MkdirAll(filepath.Join(workspace, "skills"), 0o755); err != nil { if err = os.MkdirAll(filepath.Join(workspace, "skills"), 0o755); err != nil {
return fmt.Errorf("\u2717 failed to create skills directory: %v", err) return fmt.Errorf("\u2717 failed to create skills directory: %v", err)
} }