Skip to content

no targets when --input present#310

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

no targets when --input present#310
harp-intel merged 1 commit into
mainfrom
notargetsoninput

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

if --input present don't create or attempt to connect to target(s)

@harp-intel harp-intel requested a review from Copilot April 22, 2025 03:14
@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 updates the target connection logic so that when the --input flag is specified, the process reads outputs from the input file and bypasses target connection attempts. Key changes include:

  • Adding a conditional block to read outputs from input when FlagInput is not empty.
  • Replacing the call to rc.RetrieveScriptOutputs with a direct call to outputsFromTargets.
  • Removing the now redundant RetrieveScriptOutputs function.
Comments suppressed due to low confidence (1)

internal/common/common.go:125

  • [nitpick] Consider consolidating error logging to a single helper to avoid duplicate error outputs, as the error is both printed to stderr and passed to slog.Error.
fmt.Fprintf(os.Stderr, "Error: %v\n", err)

@harp-intel harp-intel merged commit eeecf37 into main Apr 22, 2025
4 checks passed
@harp-intel harp-intel deleted the notargetsoninput branch April 22, 2025 13:14
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.

report with --input is attempting to connect to target

2 participants