Skip to content

Commit deaecb9

Browse files
committed
feat: expose -p/--profile option to start a run with a desired profile
Also: bump to madwizard 0.15.7 to pick up profile fix codeflare -p myprofile, the desired myprofile was not used in all cases by madwizard in its subprocess executions
1 parent cdae6c9 commit deaecb9

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
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 "iqaydnVus:" opt
114+
while getopts "piqaydnVus:" opt
115115
do
116116
case $opt in
117117
d) use_docker=1; continue;;

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/plugin-madwizard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"madwizard": "^0.15.6"
26+
"madwizard": "^0.15.7"
2727
}
2828
}

plugins/plugin-madwizard/src/plugin.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,34 @@ export interface Options extends ParsedOptions {
2323
/** verbose output */
2424
V: boolean
2525

26+
/** verbose output */
27+
verbose: boolean
28+
2629
/** do not load prior choices (the default "profile") */
2730
n: boolean
2831

32+
/** Use this named profile */
33+
p: string
34+
35+
/** Use this named profile */
36+
profile: string
37+
2938
/** Do not tee logs to the console */
3039
q: boolean
40+
41+
/** Do not tee logs to the console */
3142
quiet: boolean
3243

3344
/** Automatically accept all choices from the current profile */
3445
y: boolean
46+
47+
/** Automatically accept all choices from the current profile */
3548
yes: boolean
3649

3750
/** Interactive guide mode? [default: false] */
3851
i: boolean
52+
53+
/** Interactive guide mode? [default: false] */
3954
interactive: boolean
4055
}
4156

@@ -74,6 +89,7 @@ export function doMadwizard(
7489
{
7590
store: parsedOptions.s || process.env.GUIDEBOOK_STORE,
7691
verbose: parsedOptions.V,
92+
profile: parsedOptions.p,
7793
interactive: parsedOptions.i || !parsedOptions.y,
7894
}
7995
)
@@ -99,7 +115,7 @@ export function doMadwizard(
99115
export default function registerMadwizardCommands(registrar: Registrar) {
100116
const flags = {
101117
boolean: ["u", "V", "n", "q", "i", "y"],
102-
alias: { quiet: ["q"], interactive: ["i"], yes: ["y"] },
118+
alias: { quiet: ["q"], interactive: ["i"], yes: ["y"], profile: ["p"], verbose: ["V"] },
103119
}
104120

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

0 commit comments

Comments
 (0)