Code Monkey home page Code Monkey logo

Comments (9)

cdhunt avatar cdhunt commented on June 4, 2024 1

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 calls Test-Path which does support string[] for -Path, but I haven't tested if Exist 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.

jgigler avatar jgigler commented on June 4, 2024

@glaisne what version of poshspec are you using?

from poshspec.

glaisne avatar glaisne commented on June 4, 2024

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.

wikijm avatar wikijm commented on June 4, 2024

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.

Glober777 avatar Glober777 commented on June 4, 2024

@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.

Glober777 avatar Glober777 commented on June 4, 2024

@cdhunt, @markwragg is there a chance that you could publish a new version with this fix to the PSGallery?

from poshspec.

markwragg avatar markwragg commented on June 4, 2024

I can't currently publish new versions but Chris is going to give me access to do so will do after that.

from poshspec.

markwragg avatar markwragg commented on June 4, 2024

Fixed as of version 2.2.8 which has just been published to the gallery.

from poshspec.

Glober777 avatar Glober777 commented on June 4, 2024

Yay!!! Thanks a ton, @markwragg

from poshspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.