Xcode 10 beta 6 error: accessing build database

Hello I have a script to create a universal framework on Xcode 10. When I run it from Xcode everything works fine but if I tried from command line tool I receive the following error:

Build system information
error: error: accessing build database "/path/build.db": disk I/O error

Does anybody face a similar issue?