mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
fix: running approve-builds from a subdirectory of a workspace (#9048)
This commit is contained in:
6
.changeset/silent-dolls-call.md
Normal file
6
.changeset/silent-dolls-call.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/exec.build-commands": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm approve-builds` should work, when executed from a subdirectory of a workspace [#9042](https://github.com/pnpm/pnpm/issues/9042).
|
||||
@@ -3,7 +3,7 @@ import { readModulesManifest } from '@pnpm/modules-yaml'
|
||||
import { type IgnoredBuildsCommandOpts } from './ignoredBuilds'
|
||||
|
||||
export async function getAutomaticallyIgnoredBuilds (opts: IgnoredBuildsCommandOpts): Promise<null | string[]> {
|
||||
const modulesManifest = await readModulesManifest(opts.modulesDir ?? path.join(opts.dir, 'node_modules'))
|
||||
const modulesManifest = await readModulesManifest(opts.modulesDir ?? path.join(opts.lockfileDir ?? opts.dir, 'node_modules'))
|
||||
if (modulesManifest == null) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { type Config } from '@pnpm/config'
|
||||
import renderHelp from 'render-help'
|
||||
import { getAutomaticallyIgnoredBuilds } from './getAutomaticallyIgnoredBuilds'
|
||||
|
||||
export type IgnoredBuildsCommandOpts = Pick<Config, 'modulesDir' | 'dir' | 'rootProjectManifest'>
|
||||
export type IgnoredBuildsCommandOpts = Pick<Config, 'modulesDir' | 'dir' | 'rootProjectManifest' | 'lockfileDir'>
|
||||
|
||||
export const commandNames = ['ignored-builds']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user