Git Product home page Git Product logo

Comments (6)

heaths avatar heaths commented on September 21, 2024 1

Note to self: this happens with several cmdlets. Was there some reason why or was it just an oversight?

  • Get-MSIFileType
  • Edit-MSIPackage (one sharing violation, but then enumerated files in $PWD which is also incorrect)
  • Get-MSISummaryInfo

from psmsi.

heaths avatar heaths commented on September 21, 2024

A path argument is required but doesn't seem like it's enforced for parameter binding. While technically it's a breaking change, since this invocation only errs it should be okay to make a breaking change to require at least one argument.

To see how to use the cmdlets, please run help <cmdlet> or help <cmdlet> -full to see more detailed help including parameters.

from psmsi.

A9G-Data-Droid avatar A9G-Data-Droid commented on September 21, 2024

Thanks, I'm used to help being displayed when no arguments are passed. This is traditionally how commands behave. "A share violation has occurred" doesn't explain that an argument is required. It sounds more like a bug in the code.

from psmsi.

heaths avatar heaths commented on September 21, 2024

PowerShell doesn't work that way, unfortunately. You can pass -? as a sole argument which PowerShell translates to help <cmdlet>, but that's undocumented. Normally, help <cmdlet> or help about_<topic> is what you need to do. You can also run help about to see all available about topics.

So, just to be clear, this cmdlet (or any cmdlet, unless they handle it themselves which would be non-standard) will not display help when no arguments are passed.

Still, I can fix this specific problem since it shouldn't fail that way. It (and all other cmdlets) will prompt for required arguments, though.

from psmsi.

heaths avatar heaths commented on September 21, 2024

Digging in more, I'm going to leave all but Get-MSISummaryInfo because the others are designed to enumerate all files if no parameters. Not sure why I was getting the sharing violation on one machine, but was unable to reproduce on another.

from psmsi.

heaths avatar heaths commented on September 21, 2024

PowerShell Gallery has been updated with MSI version 3.3.4 with a fix for this specific issue. If -Path isn't specified, PowerShell will prompt (unless started with -NonInteractive). Bear in mind, however, that cmdlets don't emit help if you don't pass required parameters. Use help <cmdlet> for more information.

Thanks for reporting!

from psmsi.

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.