run(promiseOrFunction, name, options = {}) {
        const {
            text = name,
            spinner = 'hamburger',
            stream = this.stdout,
            clear = false,
            quiet = false
        } = options;

        const fn = () => Promise.resolve(isFunction(promiseOrFunction) ? promiseOrFunction() : promiseOrFunction);

        // The --quiet flag will skip outputting anything to the UI.
        if (quiet) {
            return fn();
        }

        this.spinner = ora({text, spinner, stream}).start();

        return fn().then((result) => {
            this.spinner[clear ? 'stop' : 'succeed']();
            return Promise.resolve(result);
        }).catch((error) => {
            this.spinner.fail();
            return Promise.reject(error);
        }).finally(() => {
            this.spinner = null;
        });
    }
Runs a spinner while a promise is pending

@param {Promise|Function} promiseOrFunction A promise or a function to run with a spinner
@param {string} name Text to output alongside the spinner
@param {Object} options Options to override the ora spinner
@return Promise<any>

@method run
@public