diff --git a/.gitignore b/.gitignore index fa183cd8b..a52b8d25a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,3 @@ dist/ # Windows Application Icon/Resource *.syso -mise/ diff --git a/cmd/picoclaw/internal/skills/install_test.go b/cmd/picoclaw/internal/skills/install_test.go index 8c101ced6..6fd6f24a6 100644 --- a/cmd/picoclaw/internal/skills/install_test.go +++ b/cmd/picoclaw/internal/skills/install_test.go @@ -38,14 +38,14 @@ func TestInstallCommandArgs(t *testing.T) { { name: "no registry with one arg passes", registry: "", - args: []string{"sioeed/picoclaw-skills/weather"}, + args: []string{"sipeed/picoclaw-skills/weather"}, wantErr: false, }, { - name: "no registry with no args fails", - registry: "", - args: []string{}, - wantErr: true, + name: "no registry with no args fails", + registry: "", + args: []string{}, + wantErr: true, errContains: "exactly 1 argument", }, { diff --git a/config/config.example.json b/config/config.example.json index 172af2b82..da97d150b 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -393,7 +393,6 @@ }, "symlink_local": true } - } }, "max_concurrent_searches": 2, "search_cache": { diff --git a/pkg/skills/index_registry_test.go b/pkg/skills/index_registry_test.go index f48eba476..910bf4638 100644 --- a/pkg/skills/index_registry_test.go +++ b/pkg/skills/index_registry_test.go @@ -11,10 +11,10 @@ import ( func TestIndexRegistryMapURL(t *testing.T) { tests := []struct { - name string - mappings map[string]string - inputURL string - expectedURL string + name string + mappings map[string]string + inputURL string + expectedURL string }{ { name: "maps HTTP to fork", @@ -41,16 +41,16 @@ func TestIndexRegistryMapURL(t *testing.T) { expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", }, { - name: "empty mappings returns original", - mappings: map[string]string{}, - inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", - expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", + name: "empty mappings returns original", + mappings: map[string]string{}, + inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", + expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", }, { - name: "nil mappings returns original", - mappings: nil, - inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", - expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", + name: "nil mappings returns original", + mappings: nil, + inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", + expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills", }, { name: "first matching prefix wins", @@ -106,10 +106,13 @@ func TestIndexRegistryIsURLAllowed(t *testing.T) { expected: true, }, { - name: "multiple prefixes first match wins", - allowedPrefixes: []string{"https://raw.githubusercontent.com/other/", "https://raw.githubusercontent.com/keithy/"}, - url: "https://raw.githubusercontent.com/keithy/angelhub/main", - expected: true, + name: "multiple prefixes first match wins", + allowedPrefixes: []string{ + "https://raw.githubusercontent.com/other/", + "https://raw.githubusercontent.com/keithy/", + }, + url: "https://raw.githubusercontent.com/keithy/angelhub/main", + expected: true, }, { name: "prefix not at start returns false",