Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions agent_plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,36 @@ func TestAgentPluginsInstallLatest(t *testing.T) {
"plugin.json should exist after install")
}

// TestAgentPluginsInstallCreatesMissingPath verifies that --path pointing at a
// directory that doesn't exist yet (including missing parents) is created
// automatically instead of failing install.
func TestAgentPluginsInstallCreatesMissingPath(t *testing.T) {
initAgentPluginsTest(t)
defer cleanAgentPluginsTest()

slug := "install-missing-path-plugin"
version := "1.0.0"
pluginPath := createTestPlugin(t, slug, version)

require.NoError(t, runAgentPluginsCmd(t,
"publish", pluginPath,
"--repo="+tests.AgentPluginsLocalRepo,
))

// installDir itself does not exist yet, and neither do its parents.
installDir := filepath.Join(t.TempDir(), "does-not-exist", "nested", "install-target")
require.NoDirExists(t, installDir)

assert.NoError(t, runAgentPluginsCmd(t,
"install", slug,
"--repo="+tests.AgentPluginsLocalRepo,
"--path="+installDir,
))

assert.FileExists(t, filepath.Join(installDir, slug, "plugin.json"),
"plugin.json should exist after install; --path should have been created automatically")
}

// TestAgentPluginsInstallSpecificVersion verifies that --version installs the
// requested version rather than latest.
func TestAgentPluginsInstallSpecificVersion(t *testing.T) {
Expand Down
16 changes: 16 additions & 0 deletions agent_skills_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,22 @@ func TestAgentSkillsInstallPathAndFlags(t *testing.T) {
assertSkillInfoManifest(t, filepath.Join(base, slug), slug, "1.0.0", "(path)", "path", tests.AgentSkillsLocalRepo)
})

t.Run("path-install-creates-missing-dir", func(t *testing.T) {
// base does not exist yet, and neither do its parents; --path should
// create it (mkdir -p semantics) instead of failing install.
base := filepath.Join(t.TempDir(), "does-not-exist", "nested", "install-target")
require.NoDirExists(t, base)

require.NoError(t, runAgentSkillsCmd(t,
"install", slug,
"--repo="+tests.AgentSkillsLocalRepo,
"--path="+base,
"--version=1.0.0",
))
assert.FileExists(t, filepath.Join(base, slug, "SKILL.md"),
"SKILL.md should exist after install; --path should have been created automatically")
})

t.Run("path-install-json", func(t *testing.T) {
base := t.TempDir()
out, err := runAgentSkillsCmdWithOutput(t,
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ require (
github.com/jfrog/build-info-go v1.13.1-0.20260826064110-7c983a17241d
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260819070735-a590327f2489
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260826121657-9a951b0bb4b7
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260828043828-c75fe2070b2c
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260827102637-b898f36ab1d3
github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e
github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260618062042-6053ab368cab
github.com/jfrog/jfrog-cli-security v1.35.0
github.com/jfrog/jfrog-client-go v1.55.1-0.20260813100550-0f2168d02558
github.com/jfrog/jfrog-client-go v1.55.1-0.20260827094947-e7a90ebc8049
github.com/jszwec/csvutil v1.10.0
github.com/moby/moby/api v1.55.0
github.com/spf13/viper v1.21.0
Expand Down Expand Up @@ -247,5 +247,3 @@ require (
// replace github.com/ktrysmt/go-bitbucket => github.com/ktrysmt/go-bitbucket v0.9.80

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.54.2-0.20251007084958-5eeaa42c31a6

// replace github.com/jfrog/jfrog-cli-artifactory => github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260818062137-18e36e626c63
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,18 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a h1:7GhcPfi+k9oOAJdCsKWjymnqH0e7DQZ1soVhbneYnGY=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a/go.mod h1:p8yLtbmCxxQucIbLZKnWu0F+EDtj6NLXbRQCEK/nb6o=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260819070735-a590327f2489 h1:FxdCh8hxWuboF+q6okuJimF96aTFNSTXlIi0Blwp3Uo=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260819070735-a590327f2489/go.mod h1:1ACZmkzA38Si48i9f052M4BDLfti02lHUfL/f853Ny0=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260826121657-9a951b0bb4b7 h1:IrRhHTynuXxyTWAZThrLuAxJ3m48fAsJ7aTIxGbSYpg=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260826121657-9a951b0bb4b7/go.mod h1:gf7aUg/G9JyltCNhwMD5RVEsFzUCKPWKXRcTXSqMYBk=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260828043828-c75fe2070b2c h1:JuYqsfGT5+ynsxXxC8L2aaTwA8WNfYUsiWrQARScQWk=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260828043828-c75fe2070b2c/go.mod h1:3t8upj+kwIY62p4AKBLSYpjGr3tTfReEPP4WChbh9lg=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260827102637-b898f36ab1d3 h1:aYeO+x+nHsUAWWZiSHjTCLiC6ls5xLG5Rq1C3LNCERk=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260827102637-b898f36ab1d3/go.mod h1:vuARjRZopsCqVcZmWzCgw5Pr9QD1FWvwFxijV4bvJJI=
github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e h1:+QYbewvK+PZKbfPpxYmy0bewhqMFtJPk/tUbCICjf8U=
github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e/go.mod h1:I83k7IH/cmMh00LyZOp13jctj8/pPKVHSAlu7GMJgwI=
github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260618062042-6053ab368cab h1:Zn/qB8LYhSu82YDtbqXwErN1RPHTHe/a3gQY6Ti/OBE=
github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260618062042-6053ab368cab/go.mod h1:lVUeZtlvrLKJRsoSu8OPN9mJ+bfeq9zSESNYao2Jgo8=
github.com/jfrog/jfrog-cli-security v1.35.0 h1:6pz+WH4Zqbl5xXvf9YEidYUn1Iz0SbdLQtwuOCPQyoI=
github.com/jfrog/jfrog-cli-security v1.35.0/go.mod h1:T1LXsW+LORDBJbZGiEPxdWeOn+zzaOGwoBFQwvEL37A=
github.com/jfrog/jfrog-client-go v1.55.1-0.20260813100550-0f2168d02558 h1:/4ayHXxzgyZ9f66EqImCyZr2SKUpygU1P36sDVAlskM=
github.com/jfrog/jfrog-client-go v1.55.1-0.20260813100550-0f2168d02558/go.mod h1:7B7eMRKuMhZ0rOdMItbJVpWjRUe1L//J3Jq+PgjiNxI=
github.com/jfrog/jfrog-client-go v1.55.1-0.20260827094947-e7a90ebc8049 h1:eogwWAzZFir1suYEgZ4ZrYrch8fhWs7ma2dxv06p/z8=
github.com/jfrog/jfrog-client-go v1.55.1-0.20260827094947-e7a90ebc8049/go.mod h1:7B7eMRKuMhZ0rOdMItbJVpWjRUe1L//J3Jq+PgjiNxI=
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=
Expand Down
Loading