fix: resolve positional prompt argument being ignored with other flags (#9004)

This commit is contained in:
김세은
2025-09-22 06:16:21 +09:00
committed by GitHub
parent 56f394cefd
commit b4455af306
5 changed files with 49 additions and 6 deletions
@@ -27,14 +27,20 @@ describe('extensions install command', () => {
});
it('should fail if both git source and local path are provided', () => {
const validationParser = yargs([]).command(installCommand).fail(false);
const validationParser = yargs([])
.command(installCommand)
.fail(false)
.locale('en');
expect(() =>
validationParser.parse('install some-url --path /some/path'),
).toThrow('Arguments source and path are mutually exclusive');
});
it('should fail if both auto update and local path are provided', () => {
const validationParser = yargs([]).command(installCommand).fail(false);
const validationParser = yargs([])
.command(installCommand)
.fail(false)
.locale('en');
expect(() =>
validationParser.parse(
'install some-url --path /some/path --auto-update',