Fix buildWorkspace flag normalization for =value forms

Handle --alwaysPack=value and --alwaysYarnPack=value variants in the
legacy flag normalization, not just the bare flag forms.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-04 10:13:57 +01:00
parent e8173b3012
commit 80f1779980
@@ -21,10 +21,18 @@ import { warnDeprecatedFlags } from '../../../lib/warnDeprecatedFlags';
import type { CommandContext } from '../../../wiring/types';
export default async ({ args, info }: CommandContext) => {
// Support legacy --alwaysYarnPack and --alwaysPack aliases
const normalizedArgs = args.map(a =>
a === '--alwaysYarnPack' || a === '--alwaysPack' ? '--always-pack' : a,
);
// Support legacy --alwaysYarnPack and --alwaysPack aliases (including =value form)
const normalizedArgs = args.map(a => {
for (const old of ['--alwaysYarnPack', '--alwaysPack']) {
if (a === old) {
return '--always-pack';
}
if (a.startsWith(`${old}=`)) {
return `--always-pack${a.substring(old.length)}`;
}
}
return a;
});
const flagDefs = {
alwaysPack: {