mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add PMG to orchestrate installation
This commit is contained in:
@@ -52,7 +52,7 @@ func (npm *npmPackageManager) ParseCommand(args []string) (*ParsedCommand, error
|
||||
}
|
||||
|
||||
// Check if this is an install command
|
||||
if !npm.isInstallCommand(args[1]) {
|
||||
if !npm.isInstallCommand(args[0]) {
|
||||
return &ParsedCommand{
|
||||
Command: command,
|
||||
}, nil
|
||||
@@ -60,7 +60,7 @@ func (npm *npmPackageManager) ParseCommand(args []string) (*ParsedCommand, error
|
||||
|
||||
// Extract packages from args
|
||||
var packages []string
|
||||
for i := 2; i < len(args); i++ {
|
||||
for i := 1; i < len(args); i++ {
|
||||
arg := args[i]
|
||||
if !strings.HasPrefix(arg, "-") {
|
||||
packages = append(packages, arg)
|
||||
|
||||
@@ -21,7 +21,7 @@ type NpmDependencyResolverConfig struct {
|
||||
func NewDefaultNpmDependencyResolverConfig() NpmDependencyResolverConfig {
|
||||
return NpmDependencyResolverConfig{
|
||||
IncludeDevDependencies: true,
|
||||
IncludeTransitiveDependencies: true,
|
||||
IncludeTransitiveDependencies: false,
|
||||
TransitiveDepth: 5,
|
||||
FailFast: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user