Skip to content

Commit f52c774

Browse files
committed
CLI: Use path.join() to join paths
1 parent 44fd8fa commit f52c774

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function getConfigPath(configPath) {
3434
var HOME = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
3535
// Since `process.cwd()` can be absolutely anything, build default path
3636
// relative to current directory:
37-
var defaultConfigPath = __dirname + '/../config/csscomb.json';
37+
var defaultConfigPath = path.join(__dirname, '../config/csscomb.json');
3838

39-
configPath = configPath || process.cwd() + '/.csscomb.json';
39+
configPath = configPath || path.join(process.cwd(), '.csscomb.json');
4040

4141
// If we've finally found a config, return its path:
4242
if (fs.existsSync(configPath)) return configPath;
@@ -53,7 +53,7 @@ function getConfigPath(configPath) {
5353

5454
// If there is no config in this directory, go one level up and look for
5555
// a config there:
56-
configPath = parentDirname + '/.csscomb.json';
56+
configPath = path.join(parentDirname, '.csscomb.json');
5757
return getConfigPath(configPath);
5858
}
5959

0 commit comments

Comments
 (0)