Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add uninstall subcommand. * Add support for removing environment directories * Create _is_subdir function * Specify which .condarc files to remove * Clean parent directories of config files * Rename ambiguous --clean to --conda-clean * Add doc strings * Clarify use of user and home in --remove-condarcs * Use target path to detect Windows reg keys * Improve HKEY handling * Do not support environment directories (menuinst may cause problems * Run menuinst separately from conda remove * Add support for environments directories * Determine base prefix for menuinst * Use CONDA_ROOT_PREFIX instead of MENUINST_BASE_PREFIX * Change homedir to Path.home() * Replace deprecated native_path_to_unix with win_path_to_unix * Remove empty parent directories of pkgs_dirs and cache directories * Consolidate parent removal functions * Add tests * Fix sentinel string for csh and tcsh * Remove pkgs directory when only urls files are present * Check that parent directories are removed for init reverse tests * Pre-create directories for menuinst on Windows * Force mocking user cache directory * Skip LongPathsEnabled registry key * Add conda to recipe test requirements * Update documentation * Replace deprecated List type * Add news file * Interpret conda.exe -m as conda.exe python -m to call run_plan_elevated * Use sudo where needed for test_uninstallation_remove_condarcs * Add a note that some files may be left behind with sudo * Add missing XDG_DATA_HOME location for Linux shortcuts * Convert path into string for init reverse plans * Use different condarc locations for sudo and non-sudo runs * Do not write directly into /root * Always write parents on mkdir * Catch PermissionError on exists for /root/.condarc * Use sudo -E * Instruct to use sudo -E in README * Create wrapper function to run uninstaller in tests * Make uninstall a subcommand of constructor * Use removeprefix * Check for directory before checking for file/symlink * Ensure that ON_CI=False for CI="0" * Patch HOMEDRIVE and HOMEPATH * Use conda environment fixtures * Add test_uninstallation_keep_config_dir * Set MENUINST_BASE_PREFIX for menuinst test * Simplify _is_subdir function * Warn about limited softlink support * Do not resolve paths in _remove_config_file_and_parents * Do not use conda fixtures for menuinst tests * Elaborate on lack of symlink support. * Rename --remove-caches to --remove-conda-caches * Expand variables for args.prefix * Ensure that mutually exclusive group is required without a subcommand * Clarify how --prefix is enforced * Remove empty parents only when created by conda * Return earlier when removing parents of config files * Do not resolve uninstall_prefix * Remove notices cache with package caches * Use XDG-style conventions for constructor uninstall CLI arguments * Fix typo in README * Apply suggestions from code review Co-authored-by: jaimergp <[email protected]> * Update src/entry_point.py Co-authored-by: jaimergp <[email protected]> --------- Co-authored-by: jaimergp <[email protected]>
- Loading branch information