Skip to content

Commit

Permalink
Making tmp directory cross-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
TehShrike committed Jun 30, 2014
1 parent 5a5ebff commit 59af378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion editor.js
@@ -1,6 +1,7 @@
var fs = require('fs')
var cp = require('child_process')
var state = require('./state.js')
var os = require('os')

var getEditor = state.getterFactory('editor')

Expand All @@ -20,7 +21,7 @@ function editFile(filename, cb) {
}

module.exports = function edit(text, cb) {
var filename = '/tmp/' + Math.round(Math.random() * 100000000)
var filename = os.tmpdir() + Math.round(Math.random() * 100000000)

if (typeof text === 'function') {
cb = text
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "kanbanize-cli",
"version": "1.1.0",
"version": "1.1.1",
"description": "Command-line Kanbanize interface",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 59af378

Please sign in to comment.