Skip to content

Commit 2783ea6

Browse files
authored
Merge pull request #18 from JonathanPitre/JonathanPitre/issue16
Fix module installation path
2 parents 40a8faa + 36ab513 commit 2783ea6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

InstallModuleFromGitHub.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'InstallModuleFromGitHub.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '1.3.0'
7+
ModuleVersion = '1.4.0'
88

99
# ID used to uniquely identify this module
1010
GUID = '2997e240-5cec-4543-a231-573576b78c88'

InstallModuleFromGitHub.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function Install-ModuleFromGitHub {
3232
$targetModuleName=$GitHubRepo.split('/')[-1]
3333
}
3434
Write-Debug "targetModuleName: $targetModuleName"
35-
35+
3636
$tmpDir = [System.IO.Path]::GetTempPath()
3737

3838
$OutFile = Join-Path -Path $tmpDir -ChildPath "$($targetModuleName).zip"
@@ -48,7 +48,7 @@ function Install-ModuleFromGitHub {
4848
if (-not ($IsLinux -or $IsOSX)) {
4949
Unblock-File $OutFile
5050
}
51-
51+
5252
$fileHash = $(Get-FileHash -Path $OutFile).hash
5353
$tmpDir = "$tmpDir/$fileHash"
5454

@@ -69,7 +69,7 @@ function Install-ModuleFromGitHub {
6969
$dest = $DestinationPath
7070
}
7171
$dest = Join-Path -Path $dest -ChildPath $targetModuleName
72-
72+
7373
$psd1 = Get-ChildItem (Join-Path -Path $tmpDir -ChildPath $unzippedArchive) -Include *.psd1 -Recurse
7474

7575
if($psd1) {
@@ -78,7 +78,7 @@ function Install-ModuleFromGitHub {
7878
$null = New-Item -ItemType directory -Path $dest -Force
7979
}
8080

81-
$null = Copy-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive)" $dest -Force -Recurse
81+
$null = Copy-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive\*)" $dest -Force -Recurse
8282

8383
}
8484
}

0 commit comments

Comments
 (0)