Skip to content

Commit

Permalink
fix: allow absolute paths for differential packages (#2397)
Browse files Browse the repository at this point in the history
## Description

allow absolute paths for differential packages

fixes: #2396

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
AustinAbro321 committed Mar 22, 2024
1 parent 329a1ae commit 63259f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pkg/packager/creator/normal.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ type PackageCreator struct {

// NewPackageCreator returns a new PackageCreator.
func NewPackageCreator(createOpts types.ZarfCreateOptions, cfg *types.PackagerConfig, cwd string) *PackageCreator {
// differentials are relative to the current working directory
if createOpts.DifferentialPackagePath != "" {
if createOpts.DifferentialPackagePath != "" && !filepath.IsAbs(createOpts.DifferentialPackagePath) {
createOpts.DifferentialPackagePath = filepath.Join(cwd, createOpts.DifferentialPackagePath)
}

Expand Down

0 comments on commit 63259f2

Please sign in to comment.