mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
fix command parsing for unknown flags (#70)
* fix command parsing for unknown flags * fix test case * add dev flag support for npm cmds
This commit is contained in:
@@ -113,6 +113,7 @@ func (p *pipCommandParser) ParseCommand(args []string) (*ParsedCommand, error) {
|
||||
|
||||
flagSet := pflag.NewFlagSet("pip", pflag.ContinueOnError)
|
||||
flagSet.SetOutput(io.Discard)
|
||||
flagSet.ParseErrorsWhitelist.UnknownFlags = true
|
||||
|
||||
// Define flags
|
||||
var requirementFiles []string
|
||||
@@ -238,6 +239,7 @@ func (u *uvCommandParser) ParseCommand(args []string) (*ParsedCommand, error) {
|
||||
// Set up flag parsing
|
||||
flagSet := pflag.NewFlagSet("uv", pflag.ContinueOnError)
|
||||
flagSet.SetOutput(io.Discard)
|
||||
flagSet.ParseErrorsWhitelist.UnknownFlags = true
|
||||
|
||||
var manifestFiles []string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user