Skip to content

Commit

Permalink
Change the config directory to be under ~/.config for Mac and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
faressoft committed Jul 15, 2023
1 parent 2533271 commit e0b5107
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
4 changes: 1 addition & 3 deletions utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit e0b5107

Please sign in to comment.