Skip to content

fix: include --output-dir only when output_dir is provided#3920

Merged
jstvz merged 1 commit intomainfrom
fix-output-dir
Sep 2, 2025
Merged

fix: include --output-dir only when output_dir is provided#3920
jstvz merged 1 commit intomainfrom
fix-output-dir

Conversation

@jstvz
Copy link
Copy Markdown
Contributor

@jstvz jstvz commented Aug 29, 2025

PR #3901 added the --output-dir option to the retrieve_components
task. When output_dir was None, it used the target (e.g. force-app) as
the value. The Salesforce CLI rejects using a package directory as
the output directory, so this caused an error reported in #3918.

This commit builds the sfdx args without --output-dir by default.
It appends --output-dir <path> only when output_dir is not
None. This lets the CLI select the default output dir when output_dir
is not given.

When output_dir is not set, files go to the package directory from the
manifest, as the CLI expects.

PR #3901 added the `--output-dir` option to the `retrieve_components`
task. When `output_dir` was `None`, it used the target (e.g. `force-app`) as
the value. The Salesforce CLI rejects using a package directory as
the output directory, so this caused an error reported in #3918.

This commit builds the sfdx args without `--output-dir` by default.
It appends `--output-dir <path>` only when `output_dir` is not
`None`. This lets the CLI select the default output dir when output_dir
is not given.

When output_dir is not set, files go to the package directory from the
manifest, as the CLI expects.
@jstvz jstvz requested a review from a team as a code owner August 29, 2025 00:27
@jstvz jstvz requested a review from vsbharath August 29, 2025 06:55
@jstvz jstvz merged commit f179b0c into main Sep 2, 2025
24 of 26 checks passed
@jstvz jstvz deleted the fix-output-dir branch September 2, 2025 23:53
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