JustinGrote / JustinGrote/PowerCD

ImportAssemblies should test if "lib" path exists first

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
40
Forks
5
PR merge metrics
No merged PRs in 30d

Description

```powershell
Get-Item: C:\Users\JGrote\Projects\PowerPrompt\BuildOutput\PowerPrompt\0.1.0\PowerPrompt.psm1
Line |
68 | $ImportAssemblies = Get-Item "$PSScriptRoot/lib/*.dll"

| ^ Cannot find path 'C:\Users\JGrote\Projects\PowerPrompt\BuildOutput\PowerPrompt\0.1.0\lib' because it does not exist.

[-] Can be imported as a module successfully 213ms
at , C:\Users\JGrote\Projects\PowerPrompt\BuildOutput\PowerPrompt\0.1.0\PowerPrompt.psm1: line 72
72: Add-Type -Path $ImportAssemblies

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot bind argument to parameter 'Path' because it is null.
[-] Can be removed as a module 11ms
at , C:\Users\JGrote\Projects\PowerPrompt\Tests\PSModule.tests.ps1: line 123
123: $BuildOutputModule | Remove-Module -erroraction stop -verbose:$false | Should BeNullOrEmpty

Cannot bind argument to parameter 'ModuleInfo' because it is null.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.