Skip to content

Commit

Permalink
fix: check-project uses correct projectDir (#1055)
Browse files Browse the repository at this point in the history
fixes #1054

Co-authored-by: Alex Potsides <alex@achingbrain.net>
  • Loading branch information
SgtPooki and achingbrain committed Aug 30, 2022
1 parent d1b1371 commit 297ac8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/check-project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from './utils.js'
import semver from 'semver'
import Listr from 'listr'
import yargsParser from 'yargs-parser'

/**
* @param {string} projectDir
Expand Down Expand Up @@ -388,7 +389,8 @@ export default new Listr([
{
title: 'check project',
task: async () => {
const projectDir = process.argv[3] || process.cwd()
const argv = yargsParser(process.argv.slice(2))._ // argv = ['check-project', ...]
const projectDir = argv[1]?.toString() ?? process.cwd()
const { branchName, repoUrl } = await getConfig(projectDir)
const manifest = fs.readJSONSync(path.join(projectDir, 'package.json'))
const monorepo = manifest.workspaces != null
Expand Down

0 comments on commit 297ac8f

Please sign in to comment.