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

CompileModule = $true fails on Classes #66

Open
TrisBits opened this issue Dec 15, 2022 · 0 comments
Open

CompileModule = $true fails on Classes #66

TrisBits opened this issue Dec 15, 2022 · 0 comments

Comments

@TrisBits
Copy link

When executing a build using $PSBPreference.Build.CompileModule = $true on a base Stucco template, I receive an error on the Task GENERATEMARKDOWN. However, if I use $PSBPreference.Build.CompileModule = $false the build will succeed.

Expected Behavior

The build of a monolithic PSM1 should not produce errors regarding Classes.

Current Behavior

I receive the following error:

Error: 2022-12-14 9:19:54 PM:
At C:\Temp\ModuleNew\Output\ModuleNew\0.1.0\ModuleNew.psm1:31 char:14 + … classes = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -Child … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: Cannot find path 'C:\Temp\ModuleNew\Output\ModuleNew\0.1.0\Classes' because it does not exist.

Steps to Reproduce (for bugs)

  1. Create a new module with Stucco
  2. Set psakeFile parameter $PSBPreference.Build.CompileModule = $true
  3. Execute .\build.ps1 from a pwsh terminal

Context

This issue prevents me from being able to build a module.

Your Environment

  • Module version used: 0.6.1
  • Operating System and PowerShell version: Windows 10 22H2 , PowerShell 7.2.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant