- "source": "$ErrorActionPreference = 'Stop'\n\n$loadedPSGraphAssembly = [AppDomain]::CurrentDomain.GetAssemblies() |\n Where-Object { $_.GetName().Name -eq 'PSGraph' } |\n Select-Object -First 1\n\nif ($loadedPSGraphAssembly) {\n Write-Warning 'PSGraph.dll is already loaded. Restart the kernel before switching module sources.'\n Get-Module PSQuickGraph, PSGraphView | Select-Object Name, Version, ModuleBase\n}\nelse {\n $workspaceRoot = Resolve-Path (Join-Path (Get-Location) '../../../../..')\n $repoRoot = Join-Path $workspaceRoot 'PSGraph'\n\n $psQuickGraphManifest = Join-Path $repoRoot 'artifacts/local-modules/PSQuickGraph/PSQuickGraph.psd1'\n $psGraphViewManifest = Join-Path $repoRoot 'artifacts/local-modules/PSGraphView/PSGraphView.psd1'\n\n if (-not (Test-Path -LiteralPath $psQuickGraphManifest)) {\n throw \"PSQuickGraph local manifest not found: $psQuickGraphManifest\"\n }\n\n if (-not (Test-Path -LiteralPath $psGraphViewManifest)) {\n throw \"PSGraphView local manifest not found: $psGraphViewManifest\"\n }\n\n Remove-Module PSQuickGraph, PSGraphView -ErrorAction SilentlyContinue\n Import-Module $psQuickGraphManifest -Force\n Import-Module $psGraphViewManifest -Force\n\n Get-Module PSQuickGraph, PSGraphView |\n Select-Object Name, Version, ModuleBase\n}",
0 commit comments