I think there should not be on:do: but instead this should be made asynchronously - the result is not needed or reused, it can check and write out warnings in parallel with the rest.

Nicolas Petton wrote:
> In cli/st/AmberCli.st:
>
> >  @@ -228,6 +229,16 @@ require: aModuleString
> >   	^require value: aModuleString
> >   !
> >
> >  +validateBasePath
> >  +	"The basePath must be an existing directory."
> >  +	| stat |
> >  +	[ stat := fs statSync: self basePath ] on: Error
> >  +	do: [ :err | console log:'Warning: option --base-path'  , (self basePath) ,', that path is'  , (err messageText) ,'.'  . ^ false ].
> >  +	stat isDirectory ifFalse: [	
> >  +		console log:'Warning: option  --base-path'  , (self basePath)  ,'  , it is not a directory.'  . ^ false ].
>
> I would also like the |on:do:| to be formatted this way:
>
> |[ ... ]
>      on: Error
>      do: [ :error |
>           console log: '...' ]
> |
>
> —
> Reply to this email directly or view it on GitHub 
> <https:/
/github.com/amber-smalltalk/amber/pull/758/files#r8230484>.
>