Skip to content

Commit e59ea75

Browse files
authored
Prefer path.basename for dir name extraction
Co-authored-by: Miguel Fonseca <150562+mcsf@users.noreply.github.com>
1 parent 0d0eb68 commit e59ea75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/env/lib/config/load-config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = async function loadConfig(
6969
);
7070

7171
// Descriptive cache directory name
72-
const directory = path.dirname( configFilePath ).replace( /^.*[\\/]/, '' );
72+
const directory = path.basename( path.dirname( configFilePath ) );
7373
const descriptiveCacheDirectoryPath = path.resolve(
7474
await getCacheDirectory(),
7575
'wp-env-' + directory + '-' + md5( configFilePath )

0 commit comments

Comments
 (0)