Fix app env pull absolute env-file paths#7705
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a path-handling bug in the app env pull --env-file command where absolute env-file paths were incorrectly “doubled” by being joined onto the app directory, causing ENOENT (notably for Windows drive-letter paths). It updates the command to resolve the env-file path correctly and adds regression coverage plus a patch changeset.
Changes:
- Switch
--env-filepath handling fromjoinPathtoresolvePathso absolute paths are preserved and relative paths resolve from the app directory. - Add command-level tests covering both absolute and relative
--env-fileinputs. - Add a patch changeset for
@shopify/app.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/app/src/cli/commands/app/env/pull.ts | Uses resolvePath to correctly compute envFile without breaking absolute paths. |
| packages/app/src/cli/commands/app/env/pull.test.ts | Adds regression tests ensuring absolute paths are passed through and relative paths resolve from app.directory. |
| .changeset/fix-app-env-pull-absolute-path.md | Patch changeset documenting the user-facing fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gonzaloriestra
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Fixes https://github.com/shop/issues/issues/47828
app env pull --env-filedoubled absolute paths because it joined the supplied file path onto the app directory, causing ENOENT errors on Windows-style paths.WHAT is this pull request doing?
Uses
resolvePathfor the env file path so absolute paths are preserved and relative paths still resolve from the app directory. Adds command-level regression coverage and a patch changeset.How to test your changes?
pnpm vitest run packages/app/src/cli/commands/app/env/pull.test.ts packages/app/src/cli/services/app/env/pull.test.tsgit diff --checkpnpm nx type-check appwas attempted, but failed before app type-check in the dependentorganizations:buildtask due unresolved@shopify/cli-kit/@graphql-typed-document-node/coreimports.Checklist