Make 'source' a positional argument in extensions install and set flag to true (#7807)

This commit is contained in:
christine betts
2025-09-05 11:44:41 -07:00
committed by GitHub
parent a7bfab4d96
commit 69da43eb70
9 changed files with 52 additions and 73 deletions
@@ -17,14 +17,14 @@ describe('extensions install command', () => {
it('should fail if no source is provided', () => {
const validationParser = yargs([]).command(installCommand).fail(false);
expect(() => validationParser.parse('install')).toThrow(
'Either --source or --path must be provided.',
'Either source or --path must be provided.',
);
});
it('should fail if both git source and local path are provided', () => {
const validationParser = yargs([]).command(installCommand).fail(false);
expect(() =>
validationParser.parse('install --source some-url --path /some/path'),
validationParser.parse('install some-url --path /some/path'),
).toThrow('Arguments source and path are mutually exclusive');
});
});