Fixup the `NodePreinstalledModuleResolver`.

Review Request #3240 - Created Dec. 12, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2701
2701, 2705
Reviewers
pants-reviews
gmalmquist, nhoward_tw, patricklaw
Previously, it assumed the `/tmp` extraction dir was on the same
filesystem as the build root (it used `os.rename`).  This change fixes
the rename to use `shutil.move` which also uses `os.rename` - but only
when appropriate.

The existing `NodeResolveIntegrationTest`
`test_resolve_preinstalled_node_module_project` failed on machines with
`/tmp` on a seperate filesystem from the build root and now passes on
those machines.

 contrib/node/src/python/pants/contrib/node/subsystems/resolvers/node_preinstalled_module_resolver.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/96402745
John Sirois
Stu Hood
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...