Closed Verten closed 2 years ago
When the blessed starting, it will looking xterm file to start.
Tput.prototype.setup = function() { this.error = null; try { if (this.termcap) { try { this.injectTermcap(); } catch (e) { if (this.debug) throw e; this.error = new Error('Termcap parse error.'); this._useInternalCap(this.terminal); } } else { try { this.injectTerminfo(); } catch (e) { if (this.debug) throw e; this.error = new Error('Terminfo parse error.'); this._useInternalInfo(this.terminal); } } } catch (e) { // If there was an error, fallback // to an internally stored terminfo/cap. if (this.debug) throw e; this.error = new Error('Terminfo not found.'); this._useXtermInfo(); } };
The final try is call method this._useXtermInfo();
this._useXtermInfo();
Tput.prototype._useXtermInfo = function() { return this.injectTerminfo(__dirname + '/../usr/xterm'); };
If we only build bundle.js, and the system ENV hasn't the xterm, the program will start failed. So add these missing files when build executable file.
When the blessed starting, it will looking xterm file to start.
The final try is call method
this._useXtermInfo();
If we only build bundle.js, and the system ENV hasn't the xterm, the program will start failed. So add these missing files when build executable file.