fix: correctly parse the default buildId (#10535)
This commit is contained in:
parent
19111be8d0
commit
c308266111
@ -274,7 +274,8 @@ export class CLI {
|
||||
}
|
||||
|
||||
#parseBuildId(version: string): string {
|
||||
return version.split('@').pop() ?? 'latest';
|
||||
const parts = version.split('@');
|
||||
return parts.length === 2 ? parts[1]! : 'latest';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,5 +75,15 @@ describe('Firefox CLI', function () {
|
||||
'--platform=linux',
|
||||
`--base-url=${getServerUrl()}`,
|
||||
]);
|
||||
|
||||
await new CLI(tmpDir).run([
|
||||
'npx',
|
||||
'@puppeteer/browsers',
|
||||
'install',
|
||||
`firefox`,
|
||||
`--path=${tmpDir}`,
|
||||
'--platform=linux',
|
||||
`--base-url=${getServerUrl()}`,
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user