mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
cli: remove distribution enforcement from tui
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/config"
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/config"
|
||||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/distros"
|
|
||||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/dms"
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/dms"
|
||||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
|
||||||
tea "github.com/charmbracelet/bubbletea"
|
tea "github.com/charmbracelet/bubbletea"
|
||||||
@@ -76,14 +74,7 @@ func findConfig(cmd *cobra.Command, args []string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func runInteractiveMode(cmd *cobra.Command, args []string) {
|
func runInteractiveMode(cmd *cobra.Command, args []string) {
|
||||||
detector, err := dms.NewDetector()
|
detector, _ := dms.NewDetector()
|
||||||
if err != nil && !errors.Is(err, &distros.UnsupportedDistributionError{}) {
|
|
||||||
log.Fatalf("Error initializing DMS detector: %v", err)
|
|
||||||
} else if errors.Is(err, &distros.UnsupportedDistributionError{}) {
|
|
||||||
log.Error("Interactive mode is not supported on this distribution.")
|
|
||||||
log.Info("Please run 'dms --help' for available commands.")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if !detector.IsDMSInstalled() {
|
if !detector.IsDMSInstalled() {
|
||||||
log.Error("DankMaterialShell (DMS) is not detected as installed on this system.")
|
log.Error("DankMaterialShell (DMS) is not detected as installed on this system.")
|
||||||
|
|||||||
Reference in New Issue
Block a user