Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import source module manifest without failing #95

Open
wants to merge 3 commits into
base: master
from

Conversation

@johlju
Copy link
Contributor

@johlju johlju commented May 21, 2020

This fixes an issue that still exist when there is no build module manifest and the SourcePath is a folder that does not contain the module name.

Prior to this fix the build was successful if SourcePath was either c:\source\ModuleName or c:\source\ModuleName\source\ModuleName.psd1, but failed if SourcePath was c:\source\s (and the module manifest was in c:\source\s\source\ModuleName.psd1. This is solved with this PR.


This change is Reviewable

johlju added 3 commits May 21, 2020
- Fails to import source module manifest when not using a build manifest
@johlju johlju changed the title WIP: Import source module manifest without failing Import source module manifest without failing May 21, 2020
@johlju johlju marked this pull request as ready for review May 21, 2020
@johlju
Copy link
Contributor Author

@johlju johlju commented May 21, 2020

@Jaykul when you have time, could you please review this PR?


# If we found more than one module info then something is wrong in the source folder.
if (@($ModuleInfo).Count -gt 1) {
throw ("Found multiple module manifest in the root of the path {0}." -f $ParameterValues["SourcePath"])

This comment has been minimized.

@Jaykul

Jaykul May 22, 2020
Member

This looks like it will break modules that currently work, if they have a Configuration.psd1 file or even a build.psd1 file

@johlju johlju closed this May 22, 2020
@johlju
Copy link
Contributor Author

@johlju johlju commented May 23, 2020

Reopen to change to suggestion in issue.

@johlju johlju reopened this May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.