Skip to content

Commit

Permalink
Remove isDependency check (default to cwd)
Browse files Browse the repository at this point in the history
  • Loading branch information
janniks committed Feb 4, 2021
1 parent 916a0dc commit 51876b0
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions bin/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ const OPT_HOOK = args.has('--hook');
const OPT_VERBOSE = args.has('--verbose');

// Paths
const launchPath = process.cwd();

const pathSegments = __dirname.split(path.sep).filter((x) => x !== '');
const lastModulesDir = pathSegments.lastIndexOf(modulesDir);

const isDependency = lastModulesDir > 0;

const basePath = isDependency
? path.resolve(path.sep, ...pathSegments.slice(0, lastModulesDir))
: launchPath;
console.log('basePath', basePath);
const basePath = process.cwd();
const modulesPath = path.resolve(basePath, modulesDir);

// Methods
Expand Down

0 comments on commit 51876b0

Please sign in to comment.