Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1051 from CCI-Tools/toniof-xxx-add_default_data_v…
Browse files Browse the repository at this point in the history
…ar_support

allow default data path to be read from environment variable
  • Loading branch information
TonioF authored Apr 17, 2023
2 parents c89630e + ce8dbbf commit 40fd5ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

* Removed the `cate upd` CLI command.

* Added support of environment variable `CATE_DATA_PATH` to set path where to
find basic cate configuration files.

## Version 3.1.6

* Fixed docker image
Expand Down
3 changes: 2 additions & 1 deletion cate/conf/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
CATE_LOCAL_DIR_NAME = 'cate-local'

DEFAULT_DATA_DIR_NAME = '.cate'
DEFAULT_DATA_PATH = os.path.join(os.path.expanduser('~'), DEFAULT_DATA_DIR_NAME)
DEFAULT_DATA_PATH = os.environ.get('CATE_DATA_PATH',
os.path.join(os.path.expanduser('~'), DEFAULT_DATA_DIR_NAME))
DEFAULT_VERSION_DATA_PATH = os.path.join(DEFAULT_DATA_PATH, __version__)

GLOBAL_CONF_FILE = os.path.join(DEFAULT_DATA_PATH, 'conf.py')
Expand Down

0 comments on commit 40fd5ad

Please sign in to comment.