Skip to content

Commit

Permalink
Merge pull request embarklabs#32 from uki00a/master
Browse files Browse the repository at this point in the history
Use os.tmpdir instead of /tmp/
  • Loading branch information
iurimatias authored Sep 3, 2019
2 parents 77d242f + 9356efc commit d2ab4ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/widgets/screen.js
Original file line number Diff line number Diff line change
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 d2ab4ef

Please sign in to comment.