mirror of
https://github.com/beclab/Olares
synced 2026-05-24 09:18:23 +00:00
cli: fix the installation in oic on Windows (#1636)
This commit is contained in:
parent
ee4655d991
commit
896c6d76f9
2 changed files with 5 additions and 2 deletions
|
|
@ -256,13 +256,14 @@ type Frp struct {
|
|||
}
|
||||
|
||||
func NewArgument() *Argument {
|
||||
si := connector.GetSystemInfo()
|
||||
arg := &Argument{
|
||||
KsEnable: true,
|
||||
KsVersion: DefaultKubeSphereVersion,
|
||||
InstallPackages: false,
|
||||
SKipPushImages: false,
|
||||
ContainerManager: Containerd,
|
||||
SystemInfo: connector.GetSystemInfo(),
|
||||
SystemInfo: si,
|
||||
Storage: &Storage{
|
||||
StorageType: ManagedMinIO,
|
||||
},
|
||||
|
|
@ -286,6 +287,7 @@ func NewArgument() *Argument {
|
|||
arg.IsCloudInstance, _ = strconv.ParseBool(os.Getenv(ENV_TERMINUS_IS_CLOUD_VERSION))
|
||||
arg.PublicNetworkInfo.PubliclyAccessible, _ = strconv.ParseBool(os.Getenv(ENV_PUBLICLY_ACCESSIBLE))
|
||||
arg.IsOlaresInContainer = os.Getenv("CONTAINER_MODE") == "oic"
|
||||
si.IsOIC = arg.IsOlaresInContainer
|
||||
|
||||
if err := arg.LoadReleaseInfo(); err != nil {
|
||||
fmt.Printf("error loading release info: %v", err)
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ type SystemInfo struct {
|
|||
LocalIp string `json:"local_ip"`
|
||||
NatGateway string `json:"nat_gateway"`
|
||||
PkgManager string `json:"pkg_manager"`
|
||||
IsOIC bool `json:"is_oic,omitempty"`
|
||||
}
|
||||
|
||||
func (s *SystemInfo) IsSupport() error {
|
||||
|
|
@ -217,7 +218,7 @@ func (s *SystemInfo) IsPveOrPveLxc() bool {
|
|||
}
|
||||
|
||||
func (s *SystemInfo) IsWsl() bool {
|
||||
return s.HostInfo.OsPlatform == common.WSL
|
||||
return s.HostInfo.OsPlatform == common.WSL && !s.IsOIC
|
||||
}
|
||||
|
||||
func (s *SystemInfo) IsRaspbian() bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue