diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 65e78e52..81107578 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -148,7 +148,7 @@ export default class RetrieveMetadata extends SfCommand { let resolvedTargetDir: string | undefined; if (flags['output-dir']) { resolvedTargetDir = resolve(flags['output-dir']); - if (this.project?.getPackageNameFromPath(resolvedTargetDir)) { + if (SfProject.getInstance()?.getPackageNameFromPath(resolvedTargetDir)) { throw messages.createError('retrieveTargetDirOverlapsPackage', [flags['output-dir']]); } }