Skip to content

[codex] Fix --path parsing for paths containing equals signs#8102

Draft
lbbbboom wants to merge 1 commit into
Shopify:mainfrom
lbbbboom:codex/preserve-path-flag-equals
Draft

[codex] Fix --path parsing for paths containing equals signs#8102
lbbbboom wants to merge 1 commit into
Shopify:mainfrom
lbbbboom:codex/preserve-path-flag-equals

Conversation

@lbbbboom

Copy link
Copy Markdown

WHY are these changes introduced?

sniffForPath() parsed the --path=<value> form with split('=')[1]. Paths containing an equals sign were truncated after the first path segment, which could make project-local detection and upgrade resolution use the wrong directory.

WHAT is this pull request doing?

  • Extract the path by removing the known --path= prefix, preserving the remainder verbatim.
  • Add a regression test for a path containing an equals sign.
  • Add a patch changeset for @shopify/cli-kit.

How to test your changes?

pnpm vitest run packages/cli-kit/src/public/node/path.test.ts packages/cli-kit/src/public/node/is-global.test.ts packages/cli-kit/src/public/node/upgrade.test.ts
pnpm eslint packages/cli-kit/src/public/node/path.ts packages/cli-kit/src/public/node/path.test.ts
pnpm nx run cli-kit:type-check --skip-nx-cache
pnpm nx run cli-kit:build --skip-nx-cache
pnpm exec changeset status --since=origin/main
git diff --check

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes; none are needed
  • I've considered analytics changes; none are needed
  • The change is user-facing and includes a patch changeset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant