Add --no-exit flag to prevent process.exit() call (close #1018)