Skip to content

Commit 4654609

Browse files
committed
fix: stop hard-coding default guidebook
This PR allows client plugins to specify the default guidebook in config.d/client "defaultGuidebook", e.g. ``` { "defaultGuidebook": "ml/codeflare" } ```
1 parent 4fe63d6 commit 4654609

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: plugins/plugin-client-default/config.d/client.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"defaultGuidebook": "ml/codeflare",
23
"contextRoot": ""
34
}

Diff for: plugins/plugin-madwizard/src/plugin.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { defaultGuidebook } from "@kui-shell/client/config.d/client.json"
1718
import { Arguments, ParsedOptions, ReactResponse, Registrar, Tab } from "@kui-shell/core"
1819

1920
export interface Options extends ParsedOptions {
@@ -104,7 +105,7 @@ export function doMadwizard({ readonlyUI = true, task, withFilepath = true, cb,
104105
return async ({ tab, argvNoOptions, parsedOptions }: Arguments<Options>) => {
105106
if (withFilepath && !argvNoOptions[1]) {
106107
// TODO codeflare should not be in plugin-madwizard
107-
argvNoOptions.push(process.env.GUIDEBOOK || "ml/codeflare")
108+
argvNoOptions.push(process.env.GUIDEBOOK || defaultGuidebook)
108109
}
109110

110111
if (envFn) {

0 commit comments

Comments
 (0)