Skip to content
Merged
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
12 changes: 10 additions & 2 deletions components/datadog/agent/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ func GetPackagePath(localPath string, flavor tifos.Flavor, agentFlavor string, a
packagePath := localPath
matches := []string{}
if pathInfo.IsDir() {
packagePath = path.Join(packagePath, subFolder)
packagePath = path.Join(packagePath, "pkg")
packagePath = path.Join(packagePath, subFolder, "pkg")

// On Windows, if a dedicated pipeline-identified folder is available, use that
if flavor == tifos.WindowsServer {
packagePathWithPipelineID := path.Join(packagePath, "pipeline-"+pipelineID)
if info, err := os.Stat(packagePathWithPipelineID); err == nil && info.IsDir() {
packagePath = packagePathWithPipelineID
}
}

entries, err := os.ReadDir(packagePath)
if err != nil {
return "", err
Expand Down