Apply suggestions from code review

Co-authored-by: Pete Gonzalez <4673363+octogonz@users.noreply.github.com>
This commit is contained in:
Cheng Liu 2024-02-28 16:39:35 -08:00 committed by GitHub
parent f6171eae05
commit 0690a22524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ export interface ICICheckoutCommandOptions {
export class CICheckoutCommand implements ICommand<ICICheckoutCommandOptions> {
public cmd: string = 'checkout';
public description: string =
'Special checkout command for CI. It only accepts project selector such as --to and --from now.';
'Special checkout command for CI. It only accepts project selector suchs as --to and --from now.';
@inject(GitSparseCheckoutService) private _gitSparseCheckoutService!: GitSparseCheckoutService;
public builder(yargs: Argv<ICICheckoutCommandOptions>): void {
yargs
@ -32,7 +32,7 @@ export class CICheckoutCommand implements ICommand<ICICheckoutCommandOptions> {
const toNum: number = (to || []).length;
const fromNum: number = (from || []).length;
if (toNum === 0 && fromNum === 0) {
throw new Error('At least one --to, --from must be specified');
throw new Error('At least one of "--to" or "--from" must be specified');
}
return true;
});