Skip to content

fix(project): avoid password file reads in dry-run update#54

Open
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/project-update-dry-run-password-file
Open

fix(project): avoid password file reads in dry-run update#54
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/project-update-dry-run-password-file

Conversation

@JerryNee

Copy link
Copy Markdown

Summary

  • keep project update --dry-run from reading --password-file before the dry-run preview
  • compute updatedFields from supplied flags, then resolve password file contents only on the real PATCH path
  • add unit and subprocess regression coverage for a missing password file under dry-run

Repro

Before this change, testsprite project update proj_anything --password-file /tmp/missing --dry-run --output json exited 1 with a raw ENOENT, even though dry-run is documented to skip filesystem writes/reads. After this change it exits 0 and previews updatedFields: ["password"].

Verification

  • npm test -- src/commands/project.test.ts
  • npm test -- test/cli.subprocess.test.ts
  • npm run typecheck
  • npm run lint
  • npm test
  • npm run build
  • node dist/index.js project update proj_anything --password-file /tmp/definitely-not-here-testsprite --dry-run --output json

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.

1 participant