Skip to content

Commit 24adf42

Browse files
committed
feat: change --auto to --yes
We have been using `-a` to mean two things: --auto as in non-interactive guide run, and also `-a` to mean "attach" for dashboard operations. This makes it impossible to attach a dashboard in non-interactive mode.
1 parent 18da3ef commit 24adf42

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

bin/codeflare

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fi
111111
# indicated by the -u option)
112112
do_cli=1
113113
use_docker=0
114-
while getopts "iqadnVus:" opt
114+
while getopts "iqaydnVus:" opt
115115
do
116116
case $opt in
117117
d) use_docker=1; continue;;

plugins/plugin-codeflare/src/controller/attach.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ import { MadWizardOptions } from "madwizard"
1919
import { Arguments, encodeComponent } from "@kui-shell/core"
2020

2121
export default async function attach(args: Arguments) {
22-
const options: MadWizardOptions = { store: process.env.GUIDEBOOK_STORE, clean: false }
22+
const options: MadWizardOptions = {
23+
store: process.env.GUIDEBOOK_STORE,
24+
clean: false,
25+
interactive: args.parsedOptions.i || !args.parsedOptions.y,
26+
}
2327

2428
// TODO: update madwizard to accept env in the options
2529
process.env.NO_WAIT = "true" // don't wait for job termination

plugins/plugin-madwizard/src/plugin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export interface Options extends ParsedOptions {
3131
quiet: boolean
3232

3333
/** Automatically accept all choices from the current profile */
34-
a: boolean
35-
auto: boolean
34+
y: boolean
35+
yes: boolean
3636

3737
/** Interactive guide mode? [default: false] */
3838
i: boolean
@@ -74,7 +74,7 @@ export function doMadwizard(
7474
{
7575
store: process.env.GUIDEBOOK_STORE,
7676
verbose: parsedOptions.V,
77-
interactive: parsedOptions.i || !parsedOptions.a,
77+
interactive: parsedOptions.i || !parsedOptions.y,
7878
}
7979
)
8080
return true
@@ -98,8 +98,8 @@ export function doMadwizard(
9898
/** Register Kui Commands */
9999
export default function registerMadwizardCommands(registrar: Registrar) {
100100
const flags = {
101-
boolean: ["u", "V", "n", "q", "i", "a"],
102-
alias: { quiet: ["q"], interactive: ["i"], auto: ["a"] },
101+
boolean: ["u", "V", "n", "q", "i", "y"],
102+
alias: { quiet: ["q"], interactive: ["i"], yes: ["y"] },
103103
}
104104

105105
registrar.listen("/profile", doMadwizard(true, "profile"))

0 commit comments

Comments
 (0)