Change the config directory to be under ~/.config for Mac and Linux
This commit is contained in:
parent
2533271eca
commit
e0b5107233
|
@ -243,7 +243,7 @@ terminalizer config
|
|||
terminalizer init
|
||||
```
|
||||
|
||||
For Linux and MacOS, the created directory is located under the home directory `~/.terminalizer`. For Windows, it is located under the `AppData`.
|
||||
For Linux and MacOS, the created directory is located under the home directory `~/config/terminalizer`. For Windows, it is located under the `AppData`.
|
||||
|
||||
## Recording
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ function command(argv) {
|
|||
// Create the global directory
|
||||
try {
|
||||
|
||||
di.fs.mkdirSync(di.utility.getGlobalDirectory());
|
||||
di.fs.mkdirSync(di.utility.getGlobalDirectory(), { recursive: true });
|
||||
|
||||
} catch (error) {
|
||||
|
||||
|
|
|
@ -235,14 +235,12 @@ function changeYAMLValue(data, key, value) {
|
|||
* @return {String}
|
||||
*/
|
||||
function getGlobalDirectory() {
|
||||
|
||||
// Windows
|
||||
if (typeof process.env.APPDATA != 'undefined') {
|
||||
return di.path.join(process.env.APPDATA, 'terminalizer');
|
||||
}
|
||||
|
||||
return di.path.join(process.env.HOME, '.terminalizer');
|
||||
|
||||
return di.path.join(process.env.HOME, '.config/terminalizer');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue