Skip to content

[codex] Support repeated exec usings#32

Merged
youngwoocho02 merged 2 commits into
youngwoocho02:mainfrom
AccelixGames:fix/exec-repeat-usings
Jun 8, 2026
Merged

[codex] Support repeated exec usings#32
youngwoocho02 merged 2 commits into
youngwoocho02:mainfrom
AccelixGames:fix/exec-repeat-usings

Conversation

@splusk2006

@splusk2006 splusk2006 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allow unity-cli exec --usings to be specified multiple times.
  • Normalize comma-separated and repeated --usings values into one de-duplicated array before sending params to Unity.
  • Canonicalize discovered project paths before cwd matching so macOS symlink aliases such as /var and /private/var resolve to the same Unity project, while preserving Windows case-insensitive matching.
  • Update CLI help, README docs, and the connector parameter description.

Root Cause

buildParams stored subcommand flags in map[string]string, so repeated flags overwrote earlier values. exec --usings A --usings B only sent the final namespace to the Unity connector even though the connector already accepts an array.

While validating with the repo Go version, an existing internal/client test also exposed a project path normalization gap on macOS: cwd could be reported through /var/... while Unity instance data used /private/var/.... That made DiscoverInstance miss the active cwd project and fall through to the multi-instance error.

Validation

  • Downloaded and used official go1.24.3 darwin/arm64 locally from go.dev/dl to match go.mod.
  • /tmp/unity-cli-go-1.24.3/go/bin/gofmt -w cmd/root.go cmd/root_test.go internal/client/client.go
  • git diff --check
  • /tmp/unity-cli-go-1.24.3/go/bin/go test ./internal/client -run TestDiscoverInstance_UsesCwdProjectMatch -count=1 -v
  • /tmp/unity-cli-go-1.24.3/go/bin/go clean -testcache && /tmp/unity-cli-go-1.24.3/go/bin/go test ./...

@youngwoocho02 youngwoocho02 marked this pull request as ready for review June 8, 2026 06:16
@youngwoocho02 youngwoocho02 merged commit c07b5db into youngwoocho02:main Jun 8, 2026
1 check passed
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.

2 participants