Comments (9)
I did not do a very good code review on this function. It has a number of issues and the whole thing should be redesigned. If anyone would like to take a stab at it, that would be great. Otherwise, I'll try to get to it shortly.
Issues:
- There are two parameter sets, but no code path for handling the "Property" set.
- The
Exist
assertion only works if you pass a Path to it. It's not functional with the currently designed$expression
. - In Pester
Exists
just callsTest-Path
which does supportstring[]
for-Path
, but I haven't tested ifExist
supports that. Either we need to test both Windows and WOW6432Node paths, or create a seperate function for SoftwareProduct32 to look in the 32bit path.
from poshspec.
@glaisne what version of poshspec are you using?
from poshspec.
I'm using 2.2.1. Accrding to repositorySourceLocation, I pulled it from powershellGallery.com.
My PS version is 5.1.15063.296, CLR is 4.0.30319.42000.
from poshspec.
Hi,
I encounter the same issue with:
PSVersion 5.1.17134.407
PSEdition Desktop
BuildVersion 10.0.17134.407
CLRVersion 4.0.30319.42000
Script poshspec
Version 2.2.2
from poshspec.
@cdhunt, given that -Exists
feels more natural (even though it is specific to paths), I wonder if it would make sense to dynamically swap -Exists
with -Not -NullOrEmpty
within SoftwareProduct
before calling Get-PoshspecParam
. What do you think?
from poshspec.
@cdhunt, @markwragg is there a chance that you could publish a new version with this fix to the PSGallery?
from poshspec.
I can't currently publish new versions but Chris is going to give me access to do so will do after that.
from poshspec.
Fixed as of version 2.2.8 which has just been published to the gallery.
from poshspec.
Yay!!! Thanks a ton, @markwragg
from poshspec.
Related Issues (20)
- Unable to call Custom functions in poshspec.
- Http tests don't work against https URLs with invalid certs HOT 4
- Additional Test: AuditPolicy
- Additional Test: LocalUser
- Additional Test: UserRightsAssignment
- Additional Private Function: Test-RunAsAdmin
- Service Function: Get-Service vs Get-WmiObject\Get-CimInstance HOT 1
- Pester 4.x support - Allow for new syntax HOT 2
- Documentation Transition HOT 3
- CHANGELOG HOT 1
- Poshspec Pester Tests broken from PR #44 HOT 1
- more efficient method for package checking HOT 1
- How to use "File Should Contain" rule HOT 4
- PowerShell Gallery shows Pester functions in this module HOT 1
- Update Wiki HOT 2
- Unable to test PowerShell Auditing Settings via registry HOT 2
- Cannot bind argument to parameter 'Command' because it is null. HOT 1
- Compatibility with latest versions of pester
- Issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poshspec.