windows режим совместимости

This commit is contained in:
wheelchairy 2025-02-08 11:40:45 +03:00
parent 92880855ea
commit 2640d53ec9

View File

@ -1,14 +1,22 @@
package cmd package cmd
import ( import (
"os"
"fmt" "fmt"
"os"
"runtime"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "train", Use: "train",
Short: "Train - сранный пакетный менеджер", Short: "Train - сраный пакетный менеджер",
Long: `Train — это лёгкий кроссплатформенный пакетный менеджер.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if runtime.GOOS == "windows" {
fmt.Println("[WARNING] Train работает на Windows в режиме совместимости. Гарантий работы нет.")
}
},
} }
func Execute() { func Execute() {