Skip to content

Commit

Permalink
fix(retrieve): improve source-tracking err message (#882)
Browse files Browse the repository at this point in the history
* fix(retrieve): improve source-tracking err message

* chore: revert link-check change

* Apply suggestions from code review

Co-authored-by: Juliet Shackell <[email protected]>

---------

Co-authored-by: Juliet Shackell <[email protected]>
  • Loading branch information
cristiand391 and jshackell-sfdc authored Jan 22, 2024
1 parent 4a291d4 commit e0aa271
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions messages/retrieve.start.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,14 @@ The retrieve target directory [%s] overlaps one of your package directories. Spe
# wantsToRetrieveCustomFields

Because you're retrieving one or more CustomFields, we're also retrieving the CustomObject to which it's associated.

# noSourceTracking

Unable to track changes in your source files.
This command expects the org to support source tracking. If it doesn't, you must specify the metadata you want to retrieve.

# noSourceTracking.actions

- Use the `--source-dir`, `--manifest` or `--package-name` flags to retrieve metadata in source format.

- Use the `--target-metadata-dir` flag to retrieve metadata in metadata format to a directory.
7 changes: 7 additions & 0 deletions src/commands/project/retrieve/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ const buildRetrieveAndDeleteTargets = async (
!flags['package-name']?.length;

if (isChanges) {
if (!(await flags['target-org'].supportsSourceTracking())) {
throw new SfError(
messages.getMessage('noSourceTracking'),
'noSourceTracking',
messages.getMessages('noSourceTracking.actions')
);
}
const stl = await SourceTracking.create({
org: flags['target-org'],
project: await SfProject.resolve(),
Expand Down

0 comments on commit e0aa271

Please sign in to comment.