devblackops / Stucco

An opinionated Plaster template for high-quality PowerShell modules
MIT License
194 stars 28 forks source link

Bug: Missing .devcontainer template in v0.5.0 #35

Open jimbrig opened 1 year ago

jimbrig commented 1 year ago

Description

When running the New-StuccoModule cmdlet under the latest version 0.5.0, if you select to Include VSCode dev container support during the wizard, you will receive an error because there is no longer a .devcontainer file in the module's templates/ directory:

image


In Version 0.5.0 of the module, you have removed various files in the module's templates/ directory. See below for a comparison of the installed module's contents comparing Version 0.4.0 and 0.5.0:

v0 4 0

v0 5 0


Steps to Reproduce

  1. Install and Import Version 0.5.0 of the Stucco Module: Install-Module Stucco > Import-Module Stucco.
  2. Run New-StuccoModule -DestinationPath .\MyModule
  3. During the wizard ensure you reply Y for the question: Do you want to include VSCode dev container support?
  4. Receive error Cannot find path <PSModulesDirectory>\Stucco\0.5.0\template\.devcontainer' because it does not exist.

Current Behavior

Receive error Cannot find path <PSModulesDirectory>\Stucco\0.5.0\template\.devcontainer' because it does not exist.

Expected behavior

Cleanly create new modules.

Possible Solution

Add back missing templates files/folders.

Screenshots

image

v0 4 0

v0 5 0

Environment

image

Additional context

jimbrig commented 1 year ago

@devblackops and other devs note that this issue seems to only occur installing from PowerShell Gallery, not if you build the module yourself.

jimbrig commented 1 year ago

@devblackops any updates for this?

HeyItsGilbert commented 1 year ago

Seems to be the same for the .github folder. @devblackops maybe something funky happened during the build? Almost like something didn't follow the dot folders (which I see with bash/zsh all the time) during a copy.

andysq62 commented 1 year ago

I've run into this, too. Can one just copy the .github template from 0.4.0 as a workaround?

MikeShepard commented 1 year ago

.vscode folder missing from psgallery pacakage too.

dlathrop commented 3 weeks ago

I installed Stucco 0.5.0 from PS Gallery via Install-Module and had the same thing happen, but it was the template.github missing that caused the error.

I was able to pull the project down from GitHub and build it, then looked at the Output\Stucco\0.5.0\template folder. It seems none of the folders starting with a period were in the version from PS Gallery. Copying them from my built version fixed the module for me.

Maybe PS Gallery doesn't like "hidden dot" folders? Alternatively, there may be an issue with copying those folders in your build/release pipeline for PS Gallery, but not in the normal build process.