You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rust/stackablectl/src/cmds/demo.rs
+16-15Lines changed: 16 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -410,30 +410,31 @@ async fn install_cmd(
410
410
// `stackablectl demo uninstall` relies on namespace deletion, suggest installing in a non-default namespace
411
411
// It should still be possible to skip that if either uninstall is not needed
412
412
// or installing an older version of the demo which only supports the 'default' namespace
413
-
let demo_namespace;
413
+
let non_default_namespace_confirmation = || -> Result<bool,CmdError>{
414
+
// Ask to install in a non-default namespace, currently suggesting the demo name as namespace name
415
+
Confirm::new()
416
+
.with_prompt(
417
+
format!(
418
+
"Demos installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the demo in the {demo_namespace:?} namespace instead?",
419
+
demo_namespace = args.demo_name.clone())
420
+
)
421
+
.default(true)
422
+
.interact()
423
+
.context(ConfirmDialogSnafu)
424
+
};
414
425
426
+
let demo_namespace;
415
427
if args.namespaces.namespace == DEFAULT_NAMESPACE{
416
-
// Ask to install in a non-default namespace, currently suggesting the demo name as namespace name
417
-
let use_non_default_namespace = tracing_indicatif::suspend_tracing_indicatif(
418
-
|| -> Result<bool,CmdError>{
419
-
Confirm::new()
420
-
.with_prompt(
421
-
format!(
422
-
"Demos installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the demo in the {demo_namespace:?} namespace instead?",
Copy file name to clipboardExpand all lines: rust/stackablectl/src/cmds/stack.rs
+15-13Lines changed: 15 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -388,22 +388,23 @@ async fn install_cmd(
388
388
// `stackablectl stack uninstall` relies on namespace deletion, suggest installing in a non-default namespace
389
389
// It should still be possible to skip that if either uninstall is not needed
390
390
// or installing an older version of the stack which only supports the 'default' namespace
391
-
let stack_namespace;
391
+
let non_default_namespace_confirmation = || -> Result<bool,CmdError>{
392
+
// Ask to install in a non-default namespace, currently suggesting the stack name as namespace name
393
+
Confirm::new()
394
+
.with_prompt(
395
+
format!(
396
+
"Stacks installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the stack in the {stack_namespace:?} namespace instead?",
397
+
stack_namespace = args.stack_name.clone())
398
+
)
399
+
.default(true)
400
+
.interact()
401
+
.context(ConfirmDialogSnafu)
402
+
};
392
403
404
+
let stack_namespace;
393
405
if args.namespaces.namespace == DEFAULT_NAMESPACE{
394
-
// Ask to install in a non-default namespace, currently suggesting the stack name as namespace name
395
406
let use_non_default_namespace = tracing_indicatif::suspend_tracing_indicatif(
396
-
|| -> Result<bool,CmdError>{
397
-
Confirm::new()
398
-
.with_prompt(
399
-
format!(
400
-
"Stacks installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the stack in the {stack_namespace:?} namespace instead?",
0 commit comments