Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Allow options anywhere

未关闭
#1,332 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
go
领域
cli

调研方向

Start by reading the CLI command and flag-parsing flow, then compare it with the aptly -h output shown in the issue. Check how flags are handled before and after commands. Done means options work in either position, and the help text makes their placement clear.

由索引模型根据 Issue 内容生成。

描述

wishlist

Deleted package with -dry-run:

aptly@aptly:~$ aptly repo remove common 'python3-cyberfusion-aptly-apicli (= 1.0.2.2)' -dry-run
Loading packages...
[-] python3-cyberfusion-aptly-apicli_1.0.2.2_all removed

... but it was actually removed, as you can see from the fact that the real run didn't delete anything:

aptly@aptly:~$ aptly repo remove common 'python3-cyberfusion-aptly-apicli (= 1.0.2.2)'
Loading packages...

This is PEBKAC. The option should be before the command:

aptly@aptly:~$ aptly repo remove -dry-run common 'python3-cyberfusion-aptly-apicli (= 1.0.2.2.1)'
Loading packages...
[-] python3-cyberfusion-aptly-apicli_1.0.2.2.1_all removed

Changes not saved, as dry run has been requested.

Even though I should have read the documentation first, to prevent mistakes like this, it might be good to accept options anywhere - as many CLIs do.

Also, where options should be is not explained in Aptly's help text:

aptly@aptly:~$ aptly -h
aptly - Debian repository management tool

Commands:

    api         start API server/issue requests
    config      manage aptly configuration
    db          manage aptly's internal database and package pool
    graph       render graph of relationships
    mirror      manage mirrors of remote repositories
    package     operations on packages
    publish     manage published repositories
    repo        manage local package repositories
    serve       HTTP serve published repositories
    snapshot    manage snapshots of repositories
    task        manage aptly tasks
    version     display version

Use "aptly help <command>" for more information about a command.


Options:
  -architectures="": list of architectures to consider during (comma-separated), default to all available
  -config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
  -db-open-attempts=10: number of attempts to open DB if it's locked by other instance
  -dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
  -dep-follow-recommends: when processing dependencies, follow Recommends
  -dep-follow-source: when processing dependencies, follow from binary to Source packages
  -dep-follow-suggests: when processing dependencies, follow Suggests
  -dep-verbose-resolve: when processing dependencies, print detailed logs
  -gpg-provider="": PGP implementation ("gpg", "gpg1", "gpg2" for external gpg or "internal" for Go internal implementation)
ERROR: unable to parse flags
主要语言
Go
星标
2.9k
派生
436
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aptly-dev/aptly 的其他 Issue

查看 aptly-dev/aptly 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。