Skip to content

Commit

Permalink
fix(utils): fix project root path definition
Browse files Browse the repository at this point in the history
  • Loading branch information
kiskv committed Nov 28, 2024
1 parent b5f31d5 commit ae8bd73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function getInstalledVarsPackage() {

function runInsideCoreComponents() {
try {
const rootPackage = require(path.join(__dirname, '../../../package.json'));
const rootPackage = require(path.join(process.cwd(), 'package.json'));
return rootPackage.name === CORE_COMPONENTS_PACKAGE;
} catch (e) {
console.log(e);
Expand All @@ -94,7 +94,7 @@ function resolveVarsFile(file) {

return fs.readFileSync(require.resolve(fullPath));
} else {
return fs.readFileSync(path.resolve(__dirname, `../../../packages/vars/src/${file}`));
return fs.readFileSync(path.resolve(process.cwd(), `packages/vars/src/${file}`));
}
}

Expand Down Expand Up @@ -268,7 +268,7 @@ function findTypographyMixins(ruleProps) {
return TYPOGRAPHY_PROPS.every((prop) => ruleProps[prop] === mixinProps[prop]);
} else {
return TYPOGRAPHY_PROPS.every(
(prop) => !ruleProps[prop] || ruleProps[prop] === mixinProps[prop]
(prop) => !ruleProps[prop] || ruleProps[prop] === mixinProps[prop],
);
}
})
Expand Down

0 comments on commit ae8bd73

Please sign in to comment.