Skip to content

fix(nuget): use unique suffix for global.json backup#823

Open
jamescrosswell wants to merge 1 commit into
getsentry:masterfrom
jamescrosswell:fix/setversion-global-json-unique
Open

fix(nuget): use unique suffix for global.json backup#823
jamescrosswell wants to merge 1 commit into
getsentry:masterfrom
jamescrosswell:fix/setversion-global-json-unique

Conversation

@jamescrosswell
Copy link
Copy Markdown
Contributor

@jamescrosswell jamescrosswell commented May 24, 2026

Summary

Follow-up to #820, addressing BYK's review note.

The backup path was hardcoded to global.json.craft-bak. If two craft invocations ever ran against the same working directory, the second would clobber the first's backup. Probability is very low in normal use (craft typically runs in a release-specific checkout), but a unique suffix costs nothing.

Uses crypto.randomUUID() to make the backup name unique per invocation.

Follow-up to getsentry#820. The backup path was a fixed `global.json.craft-bak`,
which could theoretically clash if two craft invocations ran against the
same working directory. Use `crypto.randomUUID()` to make the suffix
unique per invocation.

Refs: getsentry#820 (comment)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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