Skip to content

Commit 4d465a0

Browse files
Update cli.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0c5959d commit 4d465a0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • src/apm_cli/commands/uninstall

src/apm_cli/commands/uninstall/cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def uninstall(ctx, packages, dry_run, verbose, global_):
5858
try:
5959
# Check if apm.yml exists
6060
if not manifest_path.exists():
61-
logger.error(f"No {manifest_path} found. Run 'apm init' first.")
61+
if scope is InstallScope.USER:
62+
logger.error(
63+
"No user manifest found at ~/.apm/apm.yml. Install a package globally "
64+
"first with 'apm install -g <package>' or create the file manually."
65+
)
66+
else:
67+
logger.error(f"No {manifest_path} found. Run 'apm init' in this project first.")
6268
sys.exit(1)
6369

6470
if not packages:

0 commit comments

Comments
 (0)