From 9356efc4e7c1633f8c29c134e50fc428cf9b4b44 Mon Sep 17 00:00:00 2001 From: uki00a Date: Sat, 31 Aug 2019 13:45:09 +0900 Subject: [PATCH] Use os.tmpdir instead of /tmp/ --- lib/widgets/screen.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/widgets/screen.js b/lib/widgets/screen.js index a6fcbb6..f7932ab 100644 --- a/lib/widgets/screen.js +++ b/lib/widgets/screen.js @@ -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;