diff --git a/packages/tooling/openmrs/src/cli.ts b/packages/tooling/openmrs/src/cli.ts index 0038682c0..931cb2e36 100644 --- a/packages/tooling/openmrs/src/cli.ts +++ b/packages/tooling/openmrs/src/cli.ts @@ -40,9 +40,10 @@ yargs.command( type: 'string', }) .option('backend', { - default: 'https://dev3.openmrs.org/', + default: 'https://dev3.openmrs.org', describe: 'The backend to proxy API requests to.', type: 'string', + coerce: (arg) => (arg.endsWith('/') ? arg.slice(0, -1) : arg), }) .option('add-cookie', { default: '', @@ -132,9 +133,10 @@ yargs.command( type: 'string', }) .option('backend', { - default: 'https://dev3.openmrs.org/', + default: 'https://dev3.openmrs.org', describe: 'The backend to proxy API requests to.', type: 'string', + coerce: (arg) => (arg.endsWith('/') ? arg.slice(0, -1) : arg), }) .option('add-cookie', { default: '',