Skip to content

Commit

Permalink
osbuild: add paths option to tar stage
Browse files Browse the repository at this point in the history
  • Loading branch information
croissanne authored and achilleas-k committed Feb 8, 2024
1 parent b513055 commit 0440fba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/osbuild/tar_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ type TarStageOptions struct {

// How to handle the root node: include or omit
RootNode TarRootNode `json:"root-node,omitempty"`

// List of paths to include, instead of the whole tree
Paths []string `json:"paths,omitempty"`
}

func (TarStageOptions) isStageOptions() {}
Expand Down Expand Up @@ -81,6 +84,10 @@ func (o TarStageOptions) validate() error {
}
}

if len(o.Paths) > 0 && o.RootNode != "" {
return fmt.Errorf("'paths' cannot be combined with 'root-node'")
}

return nil
}

Expand Down

0 comments on commit 0440fba

Please sign in to comment.