Skip to content

Commit c2fd12f

Browse files
committed
Revert "fix: add validation for outside project dir"
This reverts commit 8cf4fbe.
1 parent 8cf4fbe commit c2fd12f

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

messages/retrieve.start.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,3 @@ This command expects the org to support source tracking. If it doesn't, you must
204204

205205
Starting in December 2025, this command will require that the target org use source tracking.
206206
Specifically, to use this command with a production org, scratch org created with the `--no-track-source` flag, or other non-source-tracking org, you must specify the metadata you want to retrieve with either the `--metadata`, `--source-dir`, or `--manifest` flag.
207-
208-
# outputDirOutsideProject
209-
210-
The output directory must be inside the current project. The path relative you provided %s is outside the project root.

src/commands/project/retrieve/start.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { rm } from 'node:fs/promises';
18-
import { dirname, join, relative, resolve, sep } from 'node:path';
18+
import { dirname, join, resolve, sep } from 'node:path';
1919
import * as fs from 'node:fs';
2020

2121
import { MultiStageOutput } from '@oclif/multi-stage-output';
@@ -204,16 +204,6 @@ export default class RetrieveMetadata extends SfCommand<RetrieveResultJson> {
204204
if (SfProject.getInstance()?.getPackageNameFromPath(resolvedTargetDir)) {
205205
throw messages.createError('retrieveTargetDirOverlapsPackage', [flags['output-dir']]);
206206
}
207-
208-
// Ensure --output-dir is inside the current project directory
209-
const project = await getOptionalProject();
210-
if (project) {
211-
const rel = relative(project.getPath(), resolvedTargetDir);
212-
if (rel.startsWith('..')) {
213-
// resolvedTargetDir is outside the project path
214-
throw messages.createError('outputDirOutsideProject', [flags['output-dir']]);
215-
}
216-
}
217207
}
218208
const format = flags['target-metadata-dir'] ? 'metadata' : 'source';
219209
const zipFileName = flags['zip-file-name'] ?? DEFAULT_ZIP_FILE_NAME;

0 commit comments

Comments
 (0)