Skip to content

Commit bcd326e

Browse files
committed
fix: support passing through -V verbose flag to madwizard
```shell codeflare -V ml/codeflare ``` the -V needs to be at the beginning
1 parent 89978a3 commit bcd326e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

bin/codeflare

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,18 @@ fi
110110
# check if the user wants us to run the graphical version (currently
111111
# indicated by the -u option)
112112
do_cli=1
113-
while getopts "us:" opt
113+
while getopts "Vus:" opt
114114
do
115115
case $opt in
116116
(u) do_cli=0; shift; continue;;
117117
(s) GUIDEBOOK_STORE=$OPTARG; shift; shift; continue;;
118+
(V) EXTRAPREFIX="-V"; shift; continue;;
118119
esac
119120
done
120121

121122
if [ $# = 0 ] || [ $# = 1 ] && [ "$1" != "version" ]; then
122123
# use the "guide" command if none was given
123-
EXTRAPREFIX="guide"
124+
EXTRAPREFIX="$EXTRAPREFIX guide"
124125
fi
125126

126127
if [ "$do_cli" = "1" ]; then

plugins/plugin-madwizard/src/plugin.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { Arguments, ParsedOptions, ReactResponse, Registrar, Tab } from "@kui-sh
1818

1919
interface Options extends ParsedOptions {
2020
u: boolean
21+
22+
V: boolean
2123
}
2224

2325
// TODO export this from madwizard
@@ -36,7 +38,7 @@ function withFilepath(
3638
if (!parsedOptions.u) {
3739
// CLI path
3840
const { cli } = await import("madwizard/dist/fe/cli/index.js")
39-
await cli(["madwizard", task, ...argvNoOptions.slice(1)], undefined, { store: process.env.GUIDEBOOK_STORE })
41+
await cli(["madwizard", task, ...argvNoOptions.slice(1)], undefined, { store: process.env.GUIDEBOOK_STORE, verbose: parsedOptions.V })
4042
return true
4143
}
4244

@@ -54,7 +56,7 @@ function withFilepath(
5456
/** Register Kui Commands */
5557
export default function registerMadwizardCommands(registrar: Registrar) {
5658
const flags = {
57-
boolean: ["u"],
59+
boolean: ["u", "V"],
5860
}
5961

6062
registrar.listen(

0 commit comments

Comments
 (0)