Merge pull request #32 from uki00a/master

Use os.tmpdir instead of /tmp/
This commit is contained in:
Iuri Matias 2019-09-03 08:40:59 -04:00 committed by GitHub
commit d2ab4efbf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@
var path = require('path')
, fs = require('fs')
, cp = require('child_process');
, cp = require('child_process')
, os = require('os');
var colors = require('../colors')
, program = require('../program')
@ -1832,7 +1833,7 @@ Screen.prototype.readEditor = function(options, callback) {
, editor = options.editor || process.env.EDITOR || 'vi'
, name = options.name || process.title || 'blessed'
, rnd = Math.random().toString(36).split('.').pop()
, file = '/tmp/' + name + '.' + rnd
, file = path.join(os.tmpdir(), name + '.' + rnd)
, args = [file]
, opt;