File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,19 +41,11 @@ export class EditInputSchemaCommand extends ApifyCommand<typeof EditInputSchemaC
4141 static override aliases = [ 'eis' ] ;
4242
4343 async run ( ) {
44- let result : Awaited < ReturnType < typeof readInputSchema > > ;
45-
46- try {
47- result = await readInputSchema ( {
48- forcePath : this . args . path ,
49- cwd : process . cwd ( ) ,
50- } ) ;
51- } catch ( err ) {
52- error ( { message : ( err as Error ) . message } ) ;
53- return ;
54- }
55-
56- const { inputSchema : existingSchema , inputSchemaPath } = result ;
44+ // This call fails if no input schema is found on any of the default locations
45+ const { inputSchema : existingSchema , inputSchemaPath } = await readInputSchema ( {
46+ forcePath : this . args . path ,
47+ cwd : process . cwd ( ) ,
48+ } ) ;
5749
5850 if ( existingSchema && ! inputSchemaPath ) {
5951 // If path is not returned, it means the input schema must be directly embedded as object in actor.json
You can’t perform that action at this time.
0 commit comments