Skip to content

Commit

Permalink
fix: show url tip
Browse files Browse the repository at this point in the history
  • Loading branch information
wss-git committed Nov 17, 2021
1 parent 21c003c commit 5d0d737
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,6 @@ export default class FcBaseComponent extends BaseComponent {
};
this.logger.debug(`Using event options: \n${yaml.dump(eventTypeOpts)}`);
} else if (stressOpts?.functionType === 'http') {
if (!argsData?.url) {
this.logger.error('Function type is http, please specify --url');
}
httpTypeOpts = {
url: argsData?.url,
method: argsData?.method,
Expand All @@ -486,6 +483,9 @@ export default class FcBaseComponent extends BaseComponent {
const fcStress: FcStress = new FcStress(project?.access, props?.region || argsData?.region, stressOpts, httpTypeOpts, eventTypeOpts, payloadOpts);
let fcStressArgs: string;
if (commandName === 'start') {
if (stressOpts?.functionType === 'http' && !argsData?.url) {
this.logger.error('Function type is http, please specify --url');
}
fcStressArgs = fcStress.makeStartArgs();
} else if (commandName === 'clean') {
fcStressArgs = fcStress.makeCleanArgs(argsData['assume-yes']);
Expand Down

0 comments on commit 5d0d737

Please sign in to comment.