From f1572f4bfc0ca8f1b0ffcee08b1a3a1487a19632 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Fri, 17 Mar 2017 10:08:00 -0700 Subject: [PATCH] [dev] Fix path for tmp dir in daily script --- scripts/daily.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/daily.js b/scripts/daily.js index 4d4de9aae..256bd05a8 100644 --- a/scripts/daily.js +++ b/scripts/daily.js @@ -1,5 +1,6 @@ #!/usr/bin/env babel-node const childProcess = require('child_process') +const path = require('path') const mkdirp = require('mkdirp') const semver = require('semver') const program = require('commander') @@ -40,7 +41,7 @@ function git(subCmd, opts = {}) { } async function prependToFile(filepath, string) { - mkdirp.sync('./tmp') + mkdirp.sync(path.join(__dirname, '..', 'tmp')) await exec(`echo "${string}" > ./tmp/tmpfile`) await exec(`cat ${filepath} >> ./tmp/tmpfile`) await exec(`mv ./tmp/tmpfile ${filepath}`)