diff --git a/README.md b/README.md index e5e86f7..4305d15 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/commands/init.js b/commands/init.js index a4a32f7..d497882 100644 --- a/commands/init.js +++ b/commands/init.js @@ -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) { diff --git a/utility.js b/utility.js index 992f294..b5922c2 100644 --- a/utility.js +++ b/utility.js @@ -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'); } /**