argument('npmArgs')) ?? []; try { [$package, $packageJson] = $this->getPackage(); } catch (SystemException $e) { if (!str_contains($e->getMessage(), 'is not a registered package.')) { throw $e; } array_unshift($command, $this->argument('package')); } $args = ['npm', 'update']; if ($this->option('save')) { $args[] = '--save'; } if (count($command)) { $args[] = '--'; } array_unshift($command, ...$args); return $this->npmRun($command, $package['path'] ?? ''); } }