Skip to content

Commit

Permalink
Merge pull request riptano#729 from aholmberg/merge-node-env
Browse files Browse the repository at this point in the history
update (instead of replace) node environment variables when starting
  • Loading branch information
driftx authored Mar 4, 2021
2 parents e5870fd + be9607e commit 838c491
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ccmlib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,10 +835,8 @@ def start(self,
info_message=self.name)
# Need to update the node's environment for nodetool and other tools.
# (e.g. the host's JAVA_HOME points to Java 11, but the node's software is only for Java 8)
self.__environment_variables = {
'JAVA_HOME': env['JAVA_HOME'],
'PATH': env['PATH']
}
for k in 'JAVA_HOME', 'PATH':
self.__environment_variables[k] = env[k]

common.info("Starting {} with JAVA_HOME={} java_version={} cassandra_version={}, install_dir={}"
.format(self.name, env['JAVA_HOME'], common.get_jdk_version_int(),
Expand Down
4 changes: 4 additions & 0 deletions tests/ccmtest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import os
from unittest import TestCase

try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError # Python 2.7 compatibility

class Tester(TestCase):

Expand Down

0 comments on commit 838c491

Please sign in to comment.