Skip to content

Commit

Permalink
Merge pull request #12 from edumudu/fix/windows-path
Browse files Browse the repository at this point in the history
fix: correctly use require to work in other OS
  • Loading branch information
edumudu authored Oct 19, 2023
2 parents f8edf02 + 73c7478 commit 2f50848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/cli/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
rules: {
'no-console': 'off',
'import/prefer-default-export': 'off',
'import/no-dynamic-require': 'off',
'import/extensions': ['error', 'ignorePackages', {
js: 'always',
mjs: 'always',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/config/paths.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import os from 'os';
import { createRequire } from 'module';

const require = createRequire(import.meta.url);
const { version } = require('../package.json');
const { version } = require(path.join('..', 'package.json'));

export const packageDir = path.join(os.homedir(), '.loctry');
export const modulesRoot = path.join(packageDir, 'node_modules');
Expand Down

0 comments on commit 2f50848

Please sign in to comment.