Skip to content

Commit

Permalink
fix: make command output clearer for un-implemented commands
Browse files Browse the repository at this point in the history
Throw an error for all un-implemented beta commands.
  • Loading branch information
shetzel committed Aug 25, 2022
1 parent 2b3253f commit 65cab44
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export class PackageConvert extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/uninstall/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class PackageUninstallReportCommand extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export class PackageUpdateCommand extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}
6 changes: 3 additions & 3 deletions src/commands/force/package/beta/version/create/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class PackageVersionCreateListCommand extends SfdxCommand {
}),
};

public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<never> {
throw new Error('Beta command not yet implemented');
}
}
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/version/displayancestry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class PackageVersionDisplayAncestryCommand extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/version/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class PackageVersionListCommand extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}
4 changes: 2 additions & 2 deletions src/commands/force/package/beta/version/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export class PackageVersionUpdateCommand extends SfdxCommand {
}),
};

// eslint-disable-next-line @typescript-eslint/require-await
public async run(): Promise<unknown> {
process.exitCode = 1;
return Promise.resolve('Not yet implemented');
throw new Error('Beta command not yet implemented');
}
}

0 comments on commit 65cab44

Please sign in to comment.