Skip to content

Commit

Permalink
pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 12, 2024
1 parent 9ffc1dc commit 36739ab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ import { processPackages } from './create-symlinks';
import { findLernaDir } from './find-lerna';
import { readLernaProject } from "./read-packages";
import { join, resolve } from 'path';
import { argv } from 'minimist';
import { getLogFn, logLevels } from './log';

const args = argv(process.argv.slice(2));
const argv = require('minimist')(process.argv.slice(2));

let dir = process.cwd();
if (args._ && args._[0]) {
dir = resolve(join(dir, args._[0]));
if (argv._ && argv._[0]) {
dir = resolve(join(dir, argv._[0]));
}

// Logging function based on logLevel
const currentLogLevel = args.logLevel ? logLevels.indexOf(args.logLevel.toLowerCase()) : 2; // Default to 'info'
const currentLogLevel = argv.logLevel ? logLevels.indexOf(argv.logLevel.toLowerCase()) : 2; // Default to 'info'
const log = getLogFn(currentLogLevel);
try {
const lernaJsonPath: string = findLernaDir(dir);
Expand Down

0 comments on commit 36739ab

Please sign in to comment.