You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/04/27 23:20:09 UTC

cordova-medic git commit: [CB-8910] Specifying NPM temp folder to be in build directory instead of system temp folder.

Repository: cordova-medic
Updated Branches:
  refs/heads/master 7640a905e -> a85184db5


[CB-8910] Specifying NPM temp folder to be in build directory instead of system temp folder.


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/a85184db
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/a85184db
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/a85184db

Branch: refs/heads/master
Commit: a85184db555cd42596d2731f86fdeec1a48c42f1
Parents: 7640a90
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Fri Apr 24 14:39:24 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Fri Apr 24 14:39:24 2015 -0700

----------------------------------------------------------------------
 buildbot-conf/cordova.conf | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/a85184db/buildbot-conf/cordova.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova.conf b/buildbot-conf/cordova.conf
index 949f5d4..0d75351 100644
--- a/buildbot-conf/cordova.conf
+++ b/buildbot-conf/cordova.conf
@@ -34,6 +34,8 @@ DEFAULT_REPO_NAME   = 'src'
 BASE_WORKDIR        = '.'
 TEST_APP_NAME       = 'mobilespec'
 REPOS_PROPERTY_NAME = 'repositories_config'
+NPM_CACHE_DIR       = 'npm_cache'
+NPM_TEMP_DIR        = 'npm_tmp'
 
 OSX     = 'osx'
 LINUX   = 'linux'
@@ -153,7 +155,11 @@ def NPMInstall(command=list(), **kwargs):
     # NOTE:
     #      adding the --cache parameter so that we don't use the global
     #      npm cache, which is shared with other processes
-    return NPM('install', command=command + [I('--cache=%(prop:workdir)s/npm_cache')], **kwargs)
+    #
+    #      adding the --tmp parameter so that even if the command doesn't
+    #      exit cleanly, the folder will get removed during cleanup;
+    #      refer to: https://docs.npmjs.com/files/folders#temp-files
+    return NPM('install', command=command + [I('--cache=%(prop:workdir)s/' + NPM_CACHE_DIR), I('--tmp=%(prop:workdir)s/' + NPM_TEMP_DIR)], **kwargs)
 
 def NPMTest(**kwargs):
     return NPM('test', **kwargs)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org