File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/cli/src/commands Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -634,13 +634,18 @@ async function processInitForm(
634634 name : 'directory' ,
635635 message : 'Directory to create the subgraph in' ,
636636 initial : ( ) => initDirectory || getSubgraphBasename ( subgraphName ) ,
637- validate : value =>
638- filesystem . exists ( value || initDirectory || getSubgraphBasename ( subgraphName ) )
639- ? 'Directory already exists'
640- : true ,
641637 } ,
642638 ] ) ;
643639
640+ if (
641+ filesystem . exists ( directory ) &&
642+ ! ( await prompt . confirm (
643+ 'Directory already exists, do you want to initialize the subgraph here ?' ,
644+ false ,
645+ ) )
646+ )
647+ return ;
648+
644649 let choices = ( await AVAILABLE_NETWORKS ( ) ) ?. [
645650 product === 'subgraph-studio' ? 'studio' : 'hostedService'
646651 ] ;
You can’t perform that action at this time.
0 commit comments