Skip to content

Commit 1c74430

Browse files
committed
fix: use ExternalModuleDependencies to see external module
1 parent afa9c66 commit 1c74430

2 files changed

Lines changed: 20 additions & 19 deletions

File tree

publish.ps1

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@ New-Item -Path $Publish -ItemType Directory -Force > $null
2424
if (!(Test-Path -Path $path)) {
2525
Write-Host "Generating manifest."
2626
$genParams = @{
27-
Path = $path
28-
Guid = [Guid]::NewGuid().ToString()
29-
PowerShellVersion = "5.1"
30-
Author = "guitarrapc"
31-
ModuleVersion = $v
32-
RootModule = $rootModule
33-
RequiredModules = @("PowerShell-Yaml")
34-
Description = "PowerShell Module to run scoop like ansible playbook"
35-
CompatiblePSEditions = @("Core", "Desktop")
36-
FunctionsToExport = $functionToExport
37-
AliasesToExport = $aliasToExport
38-
CmdletsToExport = @()
39-
VariablesToExport = @()
40-
Tags = "scoop"
41-
ProjectUri = "https://github.com/guitarrapc/ScoopPlaybook"
42-
LicenseUri = "https://github.com/guitarrapc/ScoopPlaybook/blob/master/LICENSE.md"
43-
ReleaseNotes = "https://github.com/guitarrapc/ScoopPlaybook/releases/tag/$Version"
27+
Path = $path
28+
Guid = [Guid]::NewGuid().ToString()
29+
PowerShellVersion = "5.1"
30+
Author = "guitarrapc"
31+
ModuleVersion = $v
32+
RootModule = $rootModule
33+
Description = "PowerShell Module to run scoop like ansible playbook"
34+
CompatiblePSEditions = @("Core", "Desktop")
35+
FunctionsToExport = $functionToExport
36+
AliasesToExport = $aliasToExport
37+
CmdletsToExport = @()
38+
VariablesToExport = @()
39+
Tags = "scoop"
40+
ProjectUri = "https://github.com/guitarrapc/ScoopPlaybook"
41+
LicenseUri = "https://github.com/guitarrapc/ScoopPlaybook/blob/master/LICENSE.md"
42+
ReleaseNotes = "https://github.com/guitarrapc/ScoopPlaybook/releases/tag/$Version"
43+
# RequiredModules = @('PowerShell-Yaml') # not work on linux pwsh
44+
ExternalModuleDependencies = @("PowerShell-Yaml")
4445
}
4546
New-ModuleManifest @genParams
4647
}

src/ScoopPlaybook.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @('PowerShell-Yaml')
54+
# RequiredModules = @()
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()
@@ -116,7 +116,7 @@ PrivateData = @{
116116
# RequireLicenseAcceptance = $false
117117

118118
# External dependent modules of this module
119-
# ExternalModuleDependencies = @()
119+
ExternalModuleDependencies = 'PowerShell-Yaml'
120120

121121
} # End of PSData hashtable
122122

0 commit comments

Comments
 (0)