Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Butler erroneously filters out manifest actions with the same path but different arguments #246

Open
ChlorideCull opened this issue Dec 12, 2022 · 0 comments

Comments

@ChlorideCull
Copy link

Basically, this code strips out all actions that point to the same binary, even if the args differ.

var uniqueTargets []*butlerd.LaunchTarget
fullPathsDone := make(map[string]struct{})
for _, target := range targets {
if _, ok := fullPathsDone[target.Strategy.FullTargetPath]; ok {
consumer.Debugf("Removing duplicate target:\n%s", target.Strategy.String())
continue
}
fullPathsDone[target.Strategy.FullTargetPath] = struct{}{}
uniqueTargets = append(uniqueTargets, target)
}
targets = uniqueTargets

Sample manifest that triggers it:

[[actions]]
name = "play"
path = "sample.exe"

[[actions]]
name = "Configure"
path = "sample.exe"
args = ["--config"]

This is the cause of itchio/itch#2525, most likely.

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

No branches or pull requests

1 participant