diff --git a/packages/cli/src/sdr.ts b/packages/cli/src/sdr.ts index 91cf7d097..dc6e06da0 100644 --- a/packages/cli/src/sdr.ts +++ b/packages/cli/src/sdr.ts @@ -38,14 +38,16 @@ sdr message: 'Subject DID', type: 'autocomplete', pageSize: 15, - suggestOnly: true, source: async (answers: any, input: string) => { const res = fuzzy .filter(input, subjects) .map((el: any) => (typeof el === 'string' ? el : el.original)) return res }, - validate(val) { + validate: (val) => { + if (val && typeof val !== 'string') { + val = val.value + } if (!val || !val.startsWith('did:')) { return "Subject DID does not start with 'did:'..." }