add COLORTERM to env in demo
This commit is contained in:
+4
-2
@@ -37,14 +37,16 @@ function startServer() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.post('/terminals', function (req, res) {
|
app.post('/terminals', function (req, res) {
|
||||||
|
const env = Object.assign({}, process.env);
|
||||||
|
env['COLORTERM'] = 'truecolor';
|
||||||
var cols = parseInt(req.query.cols),
|
var cols = parseInt(req.query.cols),
|
||||||
rows = parseInt(req.query.rows),
|
rows = parseInt(req.query.rows),
|
||||||
term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], {
|
term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], {
|
||||||
name: 'xterm-256color',
|
name: 'xterm-256color',
|
||||||
cols: cols || 80,
|
cols: cols || 80,
|
||||||
rows: rows || 24,
|
rows: rows || 24,
|
||||||
cwd: process.env.PWD,
|
cwd: env.PWD,
|
||||||
env: process.env,
|
env: env,
|
||||||
encoding: USE_BINARY_UTF8 ? null : 'utf8'
|
encoding: USE_BINARY_UTF8 ? null : 'utf8'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user