Wire most of the work from today together
This commit is contained in:
parent
40aa08c86c
commit
e57519e58d
12 changed files with 328 additions and 132 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/AlexSSD7/linsk/utils"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ var cleanCmd = &cobra.Command{
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
if strings.ToLower(string(answer)) != "y\n" {
|
||||
if utils.ClearUnprintableChars(strings.ToLower(string(answer)), false) != "y" {
|
||||
fmt.Fprintf(os.Stderr, "Aborted.\n")
|
||||
os.Exit(2)
|
||||
}
|
||||
|
|
@ -37,6 +38,8 @@ var cleanCmd = &cobra.Command{
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// TODO: Clean network tap allocations, if any.
|
||||
|
||||
slog.Info("Deleted data directory", "path", rmPath)
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue