Skip to content

Honor absolute paths passed to ziggy:generate - #891

Open
lazerg wants to merge 1 commit into
tighten:2.xfrom
lazerg:fix/issue-882-absolute-path
Open

Honor absolute paths passed to ziggy:generate#891
lazerg wants to merge 1 commit into
tighten:2.xfrom
lazerg:fix/issue-882-absolute-path

Conversation

@lazerg

@lazerg lazerg commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

ziggy:generate wraps the output path in base_path() unconditionally, so passing an absolute path like /tmp/ziggy.js writes the file under the application root instead of where it was requested. This routes every path through a small helper that only prepends base_path() when the path is relative, leaving absolute paths untouched.

Closes #882.

@lazerg
lazerg force-pushed the fix/issue-882-absolute-path branch from 64958c8 to 531720d Compare July 1, 2026 17:28
@lazerg
lazerg force-pushed the fix/issue-882-absolute-path branch from 531720d to 1231a81 Compare July 1, 2026 17:34
@bakerkretzmar bakerkretzmar self-assigned this Jul 1, 2026
@bakerkretzmar

Copy link
Copy Markdown
Collaborator

I think this is the right move but it's definitely a breaking change so it'll have to go into the next major release. Will try to get it merged sooner than later though and start planning for that. Thanks!

@lazerg

lazerg commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Hey @bakerkretzmar, mind taking a look at this one when you get a chance 🙏

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.

ziggy:generate rebases absolute output paths under base_path() instead of writing to the requested location

2 participants