Skip to content

Commit d46a370

Browse files
committed
fix(Compiler): rename psd1 for remote modules so they actually work
1 parent 11abaa1 commit d46a370

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Compiler/Resources/ScriptTemplate.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ begin {
4646
[String]$Local:TempFile = [System.IO.Path]::GetTempFileName();
4747
[Byte[]]$Local:Bytes = [System.Convert]::FromHexString($Content);
4848
[System.IO.File]::WriteAllBytes($Local:TempFile, $Local:Bytes);
49+
4950
Write-Verbose "Expanding module file: $Local:TempFile"
5051
Expand-Archive -Path $Local:TempFile -DestinationPath $Local:ModuleFolderPath -Force;
52+
53+
$Local:ManifestPath = Join-Path -Path $Local:ModuleFolderPath -ChildPath "$Local:Name.psd1";
54+
$Local:NewManifestPath = Join-Path -Path $Local:ModuleFolderPath -ChildPath "$Local:NameHash.psd1";
55+
Move-Item -Path $Local:ManifestPath -Destination $Local:NewManifestPath -Force;
5156
}
5257
Default {
5358
Write-Warning "Unknown module type: $($_)";

0 commit comments

Comments
 (0)