Skip to content

Commit

Permalink
Use os.tmpdir instead of /tmp/
Browse files Browse the repository at this point in the history
  • Loading branch information
uki00a committed Aug 31, 2019
1 parent 77d242f commit 9356efc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/widgets/screen.js
Expand Up @@ -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')
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 9356efc

Please sign in to comment.