I have come up with a fix on yarnpkg that apparently will make it compatible with the newer version of commander. That could be used until someone ports the new version of yranpkg/berry to debian repositories:
I propose to use this patch on the Ubuntu universe repositories until yarnpkg/berry is available. The latest version of yarnpkg even in lunar series will throw errors when you provide multiple arguments, for example:
yarnpkg -s -h
After installing the version from my PPA which includes this patch, the problem disappears.
I have come up with a fix on yarnpkg that apparently will make it compatible with the newer version of commander. That could be used until someone ports the new version of yranpkg/berry to debian repositories:
```diff 1.22.19. orig/src/ cli/index. js 1.22.19/ src/cli/ index.js (arg, idx, arr) => { '-'); ('-') && commander. optionFor( prev); ('-') && commander. options. find(option => option.is(prev)); optional || prevOption. required) ;
--- node-yarnpkg_
+++ node-yarnpkg_
@@ -147,7 +147,7 @@ export async function main({
const firstNonFlagIndex = args.findIndex(
const isOption = arg.startsWith(
const prev = idx > 0 && arr[idx - 1];
- const prevOption = prev && prev.startsWith
+ const prevOption = prev && prev.startsWith
const boundToPrevOption = prevOption && (prevOption.
return !isOption && !boundToPrevOption;
```
I did not send this patch to the upstream as they do not accept non-security fixes for their older yarnpkg/yarn module, but I have used it on my PPA for Ubuntu 22.04 jammy series: https:/ /launchpad. net/%7Emrazavi/ +archive/ ubuntu/ gvm?field. series_ filter= jammy
I propose to use this patch on the Ubuntu universe repositories until yarnpkg/berry is available. The latest version of yarnpkg even in lunar series will throw errors when you provide multiple arguments, for example:
yarnpkg -s -h
After installing the version from my PPA which includes this patch, the problem disappears.