"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("../server/errors");
function failSpiner(spinner) {
    return (err) => {
        if (errors_1.isHumanError(err)) {
            spinner.fail(err.getHumanMessage());
            process.exit(1);
            throw new Error(''); // cannot be reached
        }
        spinner.fail(err.message);
        throw err;
    };
}
exports.failSpiner = failSpiner;
