Skip to content

Comments

feat: add robust error-on-missing-globs configuration #5455#5534

Open
vikash7485 wants to merge 2 commits intoprefix-dev:mainfrom
vikash7485:fix/5455-error-on-missing-globs
Open

feat: add robust error-on-missing-globs configuration #5455#5534
vikash7485 wants to merge 2 commits intoprefix-dev:mainfrom
vikash7485:fix/5455-error-on-missing-globs

Conversation

@vikash7485
Copy link

Resolves #5455.

This PR introduces the error-on-missing-globs flag, allowing users to configure Pixi to halt task execution with an error instead of a soft warning when input or output globs match no files.

Key Changes:

  • pixi_manifest/src/task.rs: Added the new error_on_missing_globs boolean flag to the Execute task definition, serialized appropriately in kebab-case.
  • pixi_config/src/lib.rs: Added error_on_missing_globs field to the global Config struct (accessible under [project] or [workspace]), including merging precedence logic.
  • pixi_task & pixi_cli: Transformed warn_on_missing_globs into check_missing_globs which evaluates the new flag logic dynamically, returning an explicit fatal miette::Result error to effectively bubble up failure when glob resolutions strictly yield 0 hits.
  • Unit Test Coverage: Added a comprehensive unit test in pixi_task/src/executable_task.rs to rigorously ensure check_missing_globs panics accurately with the exact error string.

User Scenarios this supports:

With this configuration, users can now rigorously enforce checks for artifact presence, resolving instances where typoes in target blobs (such as inpt.txt vs input.txt) unexpectedly lead to tasks incorrectly performing downstream logic.

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.

Missing file in inputs or outputs return an error instead of a warning

1 participant