Repository: zarf-dev/zarf (Go)

Issue:
zarf dev find-images errors on absolute path for valuesFiles
### Environment
Device and OS: Linux
App version: 0.52.1
Kubernetes distro being used: K3s (doesn't matter)
Other:

### Steps to reproduce
1. Clone zarf repo:
2. cd to zarf/examples/helm-charts
3. in the zarf.yaml modify the path for values.yaml from: values.yaml
to

```yaml
charts:
      # Charts are organized in a list with unique chart names per component - note that a Zarf chart name does not need to match the chart name in a Chart.yaml
      - name: podinfo-local
        version: 6.4.0
        namespace: podinfo-from-local-chart
        # In this case `localPath` will load the podinfo chart that is located in the `chart` directory
        localPath: chart
        valuesFiles:
          - /home/coder/workspace/zarf/examples/helm-charts/values.yaml
        # Variables are used to override the default values in the chart
        # This can be overridden by the user at deployment time with the `--set` flag
        variables:
          - name: REPLICA_COUNT
            description: "Override the number of pod replicas"
            path: replicaCount
```
4. Execute zarf dev find-images with version 0.52.1 or above and observe the failure:

```bash
ERR unable to find images: unable to package the chart podinfo-local: unable to package the "podinfo-local" chart: unable to process the values for the package: unable to copy chart values file home/coder/workspace/zarf/examples/helm-charts/values.yaml: lstat home/coder/workspace/zarf/examples/helm-charts/values.yaml: no such file or directory
```

### Expected result
Until 0.51.0 this functionality worked as expected.
After refactor done in 0.52.1 this bug has been observed.

### Severity/Priority
High. Modifying current pipelines behavior.



Discussion: @AustinAbro321 I remember you performing the refactoring on this part of the code. Can you have a look please? Thanks!
Confirmed this is also an issue with `zarf package create` for other file types such as local charts and manifests. 
I believe the issue stems from the path being joined with the `packagePath` which strips the leading slash https://github.com/zarf-dev/zarf/blob/main/src/pkg/packager/inspect.go#L317
HI @AustinAbro321, is this regression still on the radar ?
Yes I will try to fix sometime this week
@AustinAbro321 on my end the behavior didn't change with latest zarf. Same error:

```
$ ./zarf version
v0.60.0

$ ./zarf dev find-images 
2025-08-14 11:45:56 INF processing local helm chart name=podinfo-local version=6.4.0 path=chart
2025-08-14 11:45:56 ERR unable to find images: unable to package the "podinfo-local" chart: unable to process the values for the package: unable to copy chart values file home/coder/zarf/examples/helm-charts/values.yaml: lstat home/coder/zarf/examples/helm-charts/values.yaml: no such file or directory

$ ls /home/coder/zarf/examples/helm-charts/values.yaml
/home/coder/zarf/examples/helm-charts/values.yaml
```
You are correct, my mistake, I fixed absolute paths for everything except for values file. I'm pushing up a fix now



Fix (patch):
diff --git a/src/pkg/packager/create.go b/src/pkg/packager/create.go
index 447667f9d8..2aa57dd5d9 100644
--- a/src/pkg/packager/create.go
+++ b/src/pkg/packager/create.go
@@ -52,7 +52,7 @@ func Create(ctx context.Context, packagePath string, output string, opts CreateO
 		return "", err
 	}
 
-	var differntialPkg v1alpha1.ZarfPackage
+	var differentialPkg v1alpha1.ZarfPackage
 	if opts.DifferentialPackagePath != "" {
 		pkgLayout, err := LoadPackage(ctx, opts.DifferentialPackagePath, LoadOptions{
 			Architecture:            pkg.Metadata.Architecture,
@@ -65,13 +65,13 @@ func Create(ctx context.Context, packagePath string, output string, opts CreateO
 		if err != nil {
 			return "", fmt.Errorf("failed to load differential package: %w", err)
 		}
-		differntialPkg = pkgLayout.Pkg
+		differentialPkg = pkgLayout.Pkg
 	}
 
 	assembleOpt := layout.AssembleOptions{
 		SkipSBOM:            opts.SkipSBOM,
 		OCIConcurrency:      opts.OCIConcurrency,
-		DifferentialPackage: differntialPkg,
+		DifferentialPackage: differentialPkg,
 		Flavor:              opts.Flavor,
 		RegistryOverrides:   opts.RegistryOverrides,
 		SigningKeyPath:      opts.SigningKeyPath,
diff --git a/src/pkg/packager/layout/assemble.go b/src/pkg/packager/layout/assemble.go
index bb42fbe34e..16165fc800 100644
--- a/src/pkg/packager/layout/assemble.go
+++ b/src/pkg/packager/layout/assemble.go
@@ -487,7 +487,10 @@ func PackageChart(ctx context.Context, chart v1alpha1.ZarfChart, packagePath str
 	oldValuesFiles := chart.ValuesFiles
 	valuesFiles := []string{}
 	for _, v := range chart.ValuesFiles {
-		valuesFiles = append(valuesFiles, filepath.Join(packagePath, v))
+		if !filepath.IsAbs(v) {
+			v = filepath.Join(packagePath, v)
+		}
+		valuesFiles = append(valuesFiles, v)
 	}
 	chart.ValuesFiles = valuesFiles
 	if err := helm.PackageChart(ctx, chart, chartPath, valuesFilePath); err != nil {
@@ -535,7 +538,10 @@ func assembleSkeletonComponent(ctx context.Context, component v1alpha1.ZarfCompo
 			rel := fmt.Sprintf("%s-%d", helm.StandardName(string(ValuesComponentDir), chart), valuesIdx)
 			component.Charts[chartIdx].ValuesFiles[valuesIdx] = rel
 
-			if err := helpers.CreatePathAndCopy(filepath.Join(packagePath, path), filepath.Join(compBuildPath, rel)); err != nil {
+			if !filepath.IsAbs(path) {
+				path = filepath.Join(packagePath, path)
+			}
+			if err := helpers.CreatePathAndCopy(path, filepath.Join(compBuildPath, rel)); err != nil {
 				return fmt.Errorf("unable to copy chart values file %s: %w", path, err)
 			}
 		}