Skip to content

fix(tailordb): make migration hint commands shell-safe - #1985

Merged
toiroakr merged 1 commit into
feat/tailordb-migration-validate-strictfrom
fix/migration-hint-argv-fallback
Aug 6, 2026
Merged

fix(tailordb): make migration hint commands shell-safe#1985
toiroakr merged 1 commit into
feat/tailordb-migration-validate-strictfrom
fix/migration-hint-argv-fallback

Conversation

@dqn

@dqn dqn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Copyable migration-script hint commands — from migration generate, migration validate --strict, and deploy's missing-script error — are rendered by one shell-aware formatter, so a config path that Windows shells would expand no longer produces a hint that silently targets a different file.

Before / After

With a config path containing % on Windows:

Hint output
Before --config "C:\work\%APP%\tailor.config.ts" — cmd.exe/PowerShell expand %APP% even inside double quotes
After the hint switches to an argv rendering the shell cannot corrupt: argv ["tailor","tailordb","migration","script","0001","--namespace","tailordb","--config=C:\\work\\%APP%\\tailor.config.ts","--no-script","--reason","<reason>"]

This matches how Next: commands in CLI errors already degrade on Windows.

Deploy hint changes

The deploy missing-script error now shares the same formatter, which also changes its hint:

  • the migration number is zero-padded (script 0001, previously script 1)
  • --config is bound with the = form and omitted when it resolves to the default tailor.config.ts
  • the reason placeholder is unified to <reason>

Notes

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ab23d97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tailor-platform/sdk Patch
@tailor-platform/create-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tailor-platform/create-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/create-sdk@ab23d97

@tailor-platform/eslint-plugin-sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/eslint-plugin-sdk@ab23d97

@tailor-platform/sdk

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk@ab23d97

@tailor-platform/sdk-plugin-seed

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-seed@ab23d97

@tailor-platform/sdk-plugin-tailordb-erd

pnpm add https://pkg.pr.new/tailor-platform/sdk/@tailor-platform/sdk-plugin-tailordb-erd@ab23d97

commit: ab23d97

@dqn
dqn marked this pull request as ready for review August 5, 2026 13:57
@dqn
dqn requested a review from a team as a code owner August 5, 2026 13:57
@dqn
dqn requested a review from toiroakr August 5, 2026 13:57

@toiroakr toiroakr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toiroakr
toiroakr merged commit e43d35e into feat/tailordb-migration-validate-strict Aug 6, 2026
38 checks passed
@toiroakr
toiroakr deleted the fix/migration-hint-argv-fallback branch August 6, 2026 05:19
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