@tryghost/root-utils
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -55,11 +55,13 @@ const fs = require('fs'); | ||
exports.getGhostRoot = function getGhostRoot() { | ||
let workingDirectory = process.cwd(); | ||
const currentFolder = path.join(workingDirectory, 'current'); | ||
try { | ||
let workingDirectory = process.cwd(); | ||
const currentFolder = path.join(workingDirectory, 'current'); | ||
const folderInfo = fs.statSync(currentFolder, { | ||
throwIfNoEntry: false | ||
}); | ||
if (folderInfo && folderInfo.isDirectory()) { | ||
const folderInfo = fs.statSync(currentFolder); | ||
if (folderInfo.isDirectory()) { | ||
workingDirectory = currentFolder; | ||
} | ||
} catch (err) { | ||
// No-op - continue with normal working directory | ||
} | ||
try { | ||
return findRoot(workingDirectory); | ||
@@ -66,0 +68,0 @@ } catch (err) { |
{ | ||
"name": "@tryghost/root-utils", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"repository": "https://github.com/TryGhost/framework/tree/main/packages/root-utils", | ||
@@ -30,3 +30,3 @@ "author": "Ghost Foundation", | ||
}, | ||
"gitHead": "5a96bb6d0012a4a636dd3a643b1d08eaf7d49de5" | ||
"gitHead": "ed82954e5c5b99171c998791405159b6822a5ce8" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4800
68