Repository navigation
fix(cli): treat migration creation directories as literal paths - #1453
Open
sergioperezcheco wants to merge 1 commit into
Open
sergioperezcheco wants to merge 1 commit into
sergioperezcheco wants to merge 1 commit into
Conversation
Signed-off-by: sergioperezcheco <checo520@outlook.com>
This branch has not been deployed
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.
create -dirtreats the directory as a literal path when creating files, but currently passes it unescaped tofilepath.Glob. In a directory such asmigrations[dev], sequential creation can reuse version 000001 or pick up a similarly named sibling's version; an unmatched[causes a pattern syntax error. Timestamp creation can also miss an existing version in the requested directory.Escape only the directory portion of both glob patterns, retaining the existing filename matching and version-selection behavior. Regression tests cover sequential creation, unrelated sibling directories, timestamp duplicate rejection, and ordinary paths, with platform-specific handling for literal backslashes and invalid Windows filenames.
Verified the unchanged-production failures and fixed behavior through both package tests and the built CLI. CLI and core/file/iofs/httpfs/stub race tests, CLI vet, and incremental lint passed locally on macOS with Go 1.26.4 and golangci-lint 2.13.1. The complete Docker database matrix, Windows/Linux execution, and CI-pinned lint 2.11.4 were not run locally.
From Hermes Agent / gpt-6.1-sol.