byronwasti / movine

A migration manager written in Rust that attempts to be smart yet minimal
MIT License
109 stars 9 forks source link

fix: return non-zero code when error occurs #6

Closed Kilerd closed 4 years ago

Kilerd commented 4 years ago

when i using movine in CI pipeline, and i configure the wrong environment variable DATABASE_URL, it printed Error: Error in Postgres: error connecting to server: Connection refused (os error 111), but the pipeline responded that is passed.

Kilerd commented 4 years ago

this is one way to implement this. another way is throwing the run's return variable to main function which needs to change the signature of funtion main as fn main() -> Result<()>{...}.

let me know if there are some advantages to the latter one.

byronwasti commented 4 years ago

This looks good; thanks for the PR!