Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(retrieve): improve source-tracking err message #882

Merged
merged 4 commits into from
Jan 22, 2024

Conversation

cristiand391
Copy link
Member

What does this PR do?

improves error message when trying to retrieve from an org that doesn't support source-tracking.

before:

➜  lwc-trailhead git:(main) ✗ sf project retrieve start
Preparing retrieve request... Error
Error (1): This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs.

after:

➜  lwc-trailhead git:(main) ✗ sf project retrieve start
 ›   Warning: @salesforce/plugin-deploy-retrieve is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used
 ›   instead.
Preparing retrieve request... Error
Error (1): Unable to track changes in source.
This command expects the org to support source tracking, if it doesn't you need to specify the metadata to be retrieved.

Try this:

Use `--source-dir`, `--manifest` or `--package-name` to retrieve in source format:
Use `--target-metadata-dir` to retrieve in metadata format to a directory

What issues does this PR fix or reference?

[skip-validate-pr]

@cristiand391 cristiand391 requested a review from a team as a code owner January 16, 2024 16:56
package.json Outdated Show resolved Hide resolved
messages/retrieve.start.md Outdated Show resolved Hide resolved
messages/retrieve.start.md Outdated Show resolved Hide resolved
messages/retrieve.start.md Outdated Show resolved Hide resolved
messages/retrieve.start.md Outdated Show resolved Hide resolved
@cristiand391 cristiand391 merged commit e0aa271 into main Jan 22, 2024
38 checks passed
@cristiand391 cristiand391 deleted the cd/improve-error-msg branch January 22, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants