File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,11 +96,21 @@ function Join-FlowChainProcessArguments {
9696function Set-FlowChainCargoTargetDir {
9797 param (
9898 [Parameter (Mandatory = $true )]
99- [string ] $RepoRoot
99+ [string ] $RepoRoot ,
100+
101+ [string ] $Purpose = " local"
100102 )
101103
102- $targetDir = Join-Path $RepoRoot " crates/flowmemory-devnet/target"
104+ $safePurpose = ($Purpose -replace ' [^A-Za-z0-9_.-]' , ' -' ).Trim(" -" )
105+ if ([string ]::IsNullOrWhiteSpace($safePurpose )) {
106+ $safePurpose = " local"
107+ }
108+
109+ # Keep Cargo outputs away from the default crate target so a running local
110+ # node cannot lock flowmemory-devnet.exe and break setup on Windows.
111+ $targetDir = Join-Path $RepoRoot " devnet/local/cargo-target/$safePurpose -$PID "
103112 $env: CARGO_TARGET_DIR = $targetDir
113+ New-Item - ItemType Directory - Force - Path $targetDir | Out-Null
104114 return $targetDir
105115}
106116
You can’t perform that action at this time.
0 commit comments