Skip to content

Publish breaks when Zarf package name and existing directory name collide #4148

@UncleGedd

Description

@UncleGedd

Steps to reproduce

  1. Create a new dir called bar. In bar, create a new directory called foo and a zarf.yaml with metadata.name set to foo:
kind: ZarfPackageConfig
metadata:
  name: foo
  version: 0.1.0
components:
  - name: hello-world
    required: true
    actions:
      onDeploy:
        before:
          - cmd: echo "hello world"
  1. Run zarf p publish ./zarf-package-foo-arm64-0.1.0.tar.zst <valid OCI repo>

  2. error: 2025-09-04 10:21:07 ERR failed to push manifest: failed to create file /tmp/foo: open /tmp/foo: is a directory

Expected result

zarf p publish should work

Actual Result

Zarf throws the following error: 2025-09-04 10:21:07 ERR failed to push manifest: failed to create file /tmp/foo: open /tmp/foo: is a directory

Visual Proof (screenshots, videos, text, etc)

Image

Metadata

Metadata

Assignees

Labels

bug 🐞Something isn't working

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions