import { joinAndCompact } from './chunk-VT7SXRVK.js';
import { ansis_default } from './chunk-LTYLEVHC.js';
import { my_dash_default } from './chunk-DRL5U3PK.js';
import { __name } from './chunk-IBAHCH6O.js';

// src/cli/helpers/exit-error.ts
var CliExitError = class extends Error {
  constructor(message, more) {
    super(message);
    this.more = more;
  }
  more;
  static {
    __name(this, "CliExitError");
  }
  get forceExit() {
    return !!this.more?.forceExit;
  }
  getFormattedOutput() {
    if (this.more?.silent) return "";
    let msg = `
\u{1F4A5} ${ansis_default.red(this.message)} \u{1F4A5}
`;
    if (this.more?.details) {
      msg += joinAndCompact(my_dash_default.castArray(this.more?.details), "\n");
    }
    if (this.more?.suggestion) {
      msg += joinAndCompact(my_dash_default.castArray(this.more?.suggestion), "\n");
    }
    msg += "\n";
    return msg;
  }
};

export { CliExitError };
//# sourceMappingURL=chunk-7M6WZ65V.js.map
//# sourceMappingURL=chunk-7M6WZ65V.js.map