-
Notifications
You must be signed in to change notification settings - Fork 13
Commit 883318e
committed
Set config directory according to runtime platform
This commit changes the definition of the persistent state and
configuration files to derive from the output of [platform.system()][1], rather than being fixed to an eponymous, dot-prefixed directory in the top level of the user's `$HOME`.
Furthermore, on POSIX-compliant platforms it tests for the
presence of the XDG_CONFIG_HOME environment variable and
establishes the config directory there, with a fallback to the
`$HOME/.config` directory as defined in the [XDG Base Directory Specification][2].
On Microsoft Windows® systems, it places the directory inside
the path defined by the `%LOCALAPPDATA%` environment
variable, which is the vendor-specified path for all machine-
specific application data belonging to the active user.
On all other platforms the former behavior is retained. Several
individual definitions of this path were consolidated into the
`SOCO_CLI_DIR` constant already present in the file, which itself was relocated along with the attendant `_confirm_soco_cli_dir` method earlier in the file, nearer to the other defined constants.
Include updated documentation sections in README.md that relate
to where configuration and data are stored on various platforms,
and what to delete for a complete uninstall. Validate markup syntax
using NodeJS markdownlint module, and supply syntax-
highlighting keywords for fenced code blocks a la github-linguist.
[1]: https://docs.python.org/3/library/platform.html#platform.system
[2]: https://specifications.freedesktop.org/basedir-spec/latest/index.html1 parent a75b427 commit 883318eCopy full SHA for 883318e
File tree
Expand file treeCollapse file tree
4 files changed
+461
-354
lines changedOpen diff view settings
Filter options
- soco_cli
Expand file treeCollapse file tree
4 files changed
+461
-354
lines changedOpen diff view settings
0 commit comments