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
+46-19Lines changed: 46 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -410,29 +410,32 @@ 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 = tracing_indicatif::suspend_tracing_indicatif(
414
-
|| -> Result<String,CmdError>{
415
-
if args.namespaces.namespace == DEFAULT_NAMESPACE{
416
-
ifConfirm::new()
413
+
let demo_namespace;
414
+
415
+
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()
417
420
.with_prompt(
418
421
format!(
419
422
"Demos installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the demo in the {demo_namespace:?} namespace instead?",
420
423
demo_namespace = args.demo_name.clone())
421
424
)
422
425
.default(true)
423
426
.interact()
424
-
.context(ConfirmDialogSnafu)? {
425
-
// User selected to install in suggested namespace
Copy file name to clipboardExpand all lines: rust/stackablectl/src/cmds/stack.rs
+46-18Lines changed: 46 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -388,29 +388,32 @@ 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 = tracing_indicatif::suspend_tracing_indicatif(
392
-
|| -> Result<String,CmdError>{
393
-
if args.namespaces.namespace == DEFAULT_NAMESPACE{
394
-
ifConfirm::new()
391
+
let stack_namespace;
392
+
393
+
if args.namespaces.namespace == DEFAULT_NAMESPACE{
394
+
// Ask to install in a non-default namespace, currently suggesting the stack name as namespace name
395
+
let use_non_default_namespace = tracing_indicatif::suspend_tracing_indicatif(
396
+
|| -> Result<bool,CmdError>{
397
+
Confirm::new()
395
398
.with_prompt(
396
399
format!(
397
-
"Stacks installed in the '{DEFAULT_NAMESPACE}' namespace cannot be uninstalled with stackablectl. Install the stack in the '{stack_namespace}' namespace instead?",
400
+
"Stacks installed in the {DEFAULT_NAMESPACE:?} namespace cannot be uninstalled with stackablectl. Install the stack in the {stack_namespace:?} namespace instead?",
398
401
stack_namespace = args.stack_name.clone())
399
402
)
400
403
.default(true)
401
404
.interact()
402
-
.context(ConfirmDialogSnafu)? {
403
-
// User selected to install in suggested namespace
0 commit comments