Skip to content

fix: keep global install dry-run out of user state - #2592

Draft
Aryan Singh K. (aryansk) wants to merge 1 commit into
microsoft:mainfrom
aryansk:fix/2549-global-dry-run-no-writes
Draft

fix: keep global install dry-run out of user state#2592
Aryan Singh K. (aryansk) wants to merge 1 commit into
microsoft:mainfrom
aryansk:fix/2549-global-dry-run-no-writes

Conversation

@aryansk

Copy link
Copy Markdown

Summary

Make apm install --dry-run -g truly read-only when bootstrapping a user-scope manifest.

Changes

  • skip ensure_user_dirs() during dry-run
  • redirect an absent global apm.yml to temporary storage so validation and planning can still parse a manifest
  • keep user-facing output pointed at the real global manifest path
  • clean up temporary preview state in the command finally path
  • add regressions proving an absent user manifest does not create ~/.apm

Validation

Prepared focused regression tests:
pytest -q tests/unit/regressions/test_issue_2549_global_dry_run.py

Patch structure was validated with git apply --check. Full repository tests should run in CI.

Fixes #2549

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.

[BUG] apm install --dry-run creates ~/.apm/apm.yml, config.json, and apm_modules/ while reporting "no changes made"

1 participant