diff options
author | Timo Teräs <timo.teras@iki.fi> | 2022-12-20 15:32:49 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-12-20 15:35:05 +0200 |
commit | af6e2c757e193006e303c9377b37d817364eda7a (patch) | |
tree | 62373fb9a439f721b5fd26d8a31207b0e0a2a653 /src/apk.c | |
parent | cb6742953386cb958e52d90ec9198fb8f65c3a71 (diff) | |
download | apk-tools-af6e2c757e193006e303c9377b37d817364eda7a.tar.gz apk-tools-af6e2c757e193006e303c9377b37d817364eda7a.tar.bz2 apk-tools-af6e2c757e193006e303c9377b37d817364eda7a.tar.xz apk-tools-af6e2c757e193006e303c9377b37d817364eda7a.zip |
apk: improve interactive mode handling
- implement and document --no-interactive
- improve --interactive documentation
- treat EOF as Y
fixes #10860
Diffstat (limited to 'src/apk.c')
-rw-r--r-- | src/apk.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -71,6 +71,7 @@ static void version(struct apk_out *out, const char *prefix) OPT(OPT_GLOBAL_interactive, APK_OPT_SH("i") "interactive") \ OPT(OPT_GLOBAL_keys_dir, APK_OPT_ARG "keys-dir") \ OPT(OPT_GLOBAL_no_cache, "no-cache") \ + OPT(OPT_GLOBAL_no_interactive, "no-interactive") \ OPT(OPT_GLOBAL_no_logfile, "no-logfile") \ OPT(OPT_GLOBAL_no_network, "no-network") \ OPT(OPT_GLOBAL_no_progress, "no-progress") \ @@ -156,6 +157,9 @@ static int option_parse_global(void *ctx, struct apk_ctx *ac, int opt, const cha case OPT_GLOBAL_interactive: ac->flags |= APK_INTERACTIVE; break; + case OPT_GLOBAL_no_interactive: + ac->flags &= ~APK_INTERACTIVE; + break; case OPT_GLOBAL_preserve_env: ac->flags |= APK_PRESERVE_ENV; break; |