Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/targets/nuget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
writeFileSync,
} from 'fs';
import { join } from 'path';
import { randomUUID } from 'crypto';

import { TargetConfig, TypedTargetConfig } from '../schemas/project_config';
import { ConfigurationError, reportError } from '../utils/errors';
Expand Down Expand Up @@ -88,7 +89,7 @@ export class NugetTarget extends BaseTarget {
// which breaks if the pinned SDK isn't installed on the craft runner.
// See: https://github.com/getsentry/craft/issues/819
const globalJsonPath = join(rootDir, 'global.json');
const globalJsonBackup = `${globalJsonPath}.craft-bak`;
const globalJsonBackup = `${globalJsonPath}.craft-bak-${randomUUID()}`;
const globalJsonMoved = existsSync(globalJsonPath);
if (globalJsonMoved) {
renameSync(globalJsonPath, globalJsonBackup);
Expand Down
Loading