Skip to content

Commit 7fbb04c

Browse files
author
Flora-Network
committed
bug #24
1 parent ce18337 commit 7fbb04c

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

flora/cmds/init_funcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,16 @@ def flora_full_version_str() -> str:
314314

315315

316316
def flora_init(root_path: Path):
317-
if os.environ.get("CHIA_ROOT", None) is not None:
317+
if os.environ.get("FLORA_ROOT", None) is not None:
318318
print(
319-
f"warning, your CHIA_ROOT is set to {os.environ['CHIA_ROOT']}. "
319+
f"warning, your FLORA_ROOT is set to {os.environ['FLORA_ROOT']}. "
320320
f"Please unset the environment variable and run flora init again\n"
321321
f"or manually migrate config.yaml"
322322
)
323323

324324
print(f"Flora directory {root_path}")
325325
if root_path.is_dir() and Path(root_path / "config" / "config.yaml").exists():
326-
# This is reached if CHIA_ROOT is set, or if user has run flora init twice
326+
# This is reached if FLORA_ROOT is set, or if user has run flora init twice
327327
# before a new update.
328328
check_keys(root_path)
329329
print(f"{root_path} already exists, no migration action taken")

flora/cmds/start_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
def launch_start_daemon(root_path: Path) -> subprocess.Popen:
14-
os.environ["CHIA_ROOT"] = str(root_path)
14+
os.environ["FLORA_ROOT"] = str(root_path)
1515
# TODO: use startupinfo=subprocess.DETACHED_PROCESS on windows
1616
flora = sys.argv[0]
1717
process = subprocess.Popen(f"{flora} run_daemon".split(), stdout=subprocess.PIPE)

flora/daemon/server.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@ def plotter_log_path(root_path: Path, id: str):
749749

750750

751751
def launch_plotter(root_path: Path, service_name: str, service_array: List[str], id: str):
752-
# we need to pass on the possibly altered CHIA_ROOT
753-
os.environ["CHIA_ROOT"] = str(root_path)
752+
# we need to pass on the possibly altered FLORA_ROOT
753+
os.environ["FLORA_ROOT"] = str(root_path)
754754
service_executable = executable_for_service(service_array[0])
755755

756756
# Swap service name with name of executable
@@ -799,14 +799,14 @@ def launch_service(root_path: Path, service_command) -> Tuple[subprocess.Popen,
799799
"""
800800
Launch a child process.
801801
"""
802-
# set up CHIA_ROOT
802+
# set up FLORA_ROOT
803803
# invoke correct script
804804
# save away PID
805805

806-
# we need to pass on the possibly altered CHIA_ROOT
807-
os.environ["CHIA_ROOT"] = str(root_path)
806+
# we need to pass on the possibly altered FLORA_ROOT
807+
os.environ["FLORA_ROOT"] = str(root_path)
808808

809-
log.debug(f"Launching service with CHIA_ROOT: {os.environ['CHIA_ROOT']}")
809+
log.debug(f"Launching service with FLORA_ROOT: {os.environ['FLORA_ROOT']}")
810810

811811
# Insert proper e
812812
service_array = service_command.split()

flora/util/default_root.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import os
22
from pathlib import Path
33

4-
DEFAULT_ROOT_PATH = Path(os.path.expanduser(os.getenv("CHIA_ROOT", "~/.flora/mainnet"))).resolve()
4+
DEFAULT_ROOT_PATH = Path(os.path.expanduser(os.getenv("FLORA_ROOT", "~/.flora/mainnet"))).resolve()

0 commit comments

Comments
 (0)