Skip to content

Fix error when no target name is provided in the targets yaml file.#313

Merged
harp-intel merged 1 commit into
mainfrom
nonameyaml
Apr 22, 2025
Merged

Fix error when no target name is provided in the targets yaml file.#313
harp-intel merged 1 commit into
mainfrom
nonameyaml

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

No description provided.

@harp-intel harp-intel requested a review from Copilot April 22, 2025 18:27
@harp-intel harp-intel linked an issue Apr 22, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an error case when no target name is provided in the targets YAML file by adjusting how target objects are created and their corresponding temporary directories are determined, as well as relocating the isNoExec function for improved organization.

  • Moved the isNoExec function to the end of the file.
  • Reordered target object creation in getTargetsFromFile to use newTarget.GetName() for directory creation.
Comments suppressed due to low confidence (1)

internal/common/targets.go:327

  • Ensure that using newTarget.GetName() to generate the target-specific directory is intended, especially if the YAML file might not supply an explicit target name.
localTargetDir := path.Join(localTempDir, newTarget.GetName())

@harp-intel harp-intel merged commit 6f15359 into main Apr 22, 2025
5 of 6 checks passed
@harp-intel harp-intel deleted the nonameyaml branch April 22, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when no name provided to target in targets.yaml

2 participants