Closed Phate334 closed 2 years ago
Describe the bug
In twcc.py#L12, if os.path.isdir(os.environ['TWCC_DATA_PATH']) is true, then twccli.py#L21 will throw FileExistsError.
os.path.isdir(os.environ['TWCC_DATA_PATH'])
To Reproduce
Just set TWCC_DATA_PATH environment variable, and run twccli config init. But create _TWCC_DATA_DIR_ and log directory manually, everything is good.
twccli config init
_TWCC_DATA_DIR_
log
Expected behavior
customize twcc_data directory path.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
https://docs.python.org/3/library/os.html#os.makedirs https://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir
fixed in v0.6.0
Describe the bug
In twcc.py#L12, if
os.path.isdir(os.environ['TWCC_DATA_PATH'])
is true, then twccli.py#L21 will throw FileExistsError.To Reproduce
Just set TWCC_DATA_PATH environment variable, and run
twccli config init
. But create_TWCC_DATA_DIR_
andlog
directory manually, everything is good.Expected behavior
customize twcc_data directory path.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
https://docs.python.org/3/library/os.html#os.makedirs https://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir