sequenceserver
sequenceserver copied to clipboard
setup script should elegantly handle incorrect database dir
Currently it dies - it should just ask again
[2020-03-14 11:11:41] INFO Configuration file not found: /Users/Yannick/.sequenceserver.conf
Database dir not set.
SequenceServer needs to know where your FASTA files or BLAST+ databases are.
Please enter the path to the relevant directory (default: current directory).
Press Ctrl+C to quit.
>> ~/db
[2020-03-14 11:21:27] INFO Configuration file not found: /Users/Yannick/.sequenceserver.conf
Could not find database dir: /Users/Yannick/db
➜ Developer ls ~/db
ls: /Users/Yannick/db: No such file or directory
➜ Developer ls ~/db
I think the setup script should do the same for 'path to blast binaries' as well and can be done by defining a little helper method that prompts and re-prompts the user for input till valid (i.e., file exists and is a directory).
I have submitted a PR for this (though I still need to get the tests passing): #499