Skip to content

Commit 17be921

Browse files
authored
Merge pull request #325 from Bedrock-OSS/develop
Regolith 1.5.2
2 parents f515b3a + a851399 commit 17be921

File tree

4 files changed

+16
-51
lines changed

4 files changed

+16
-51
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

regolith/compatibility_windows.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ func copyFileSecurityInfo(source string, target string) error {
5656
// FindStandardMojangDir returns path to the com.mojang folder in the standard
5757
// Minecraft build.
5858
func FindStandardMojangDir() (string, error) {
59+
comMojang := os.Getenv("COM_MOJANG")
60+
if comMojang != "" {
61+
return comMojang, nil
62+
}
5963
result := filepath.Join(
6064
os.Getenv("LOCALAPPDATA"), "Packages",
6165
"Microsoft.MinecraftUWP_8wekyb3d8bbwe", "LocalState", "games",
@@ -72,6 +76,10 @@ func FindStandardMojangDir() (string, error) {
7276
// FindPreviewDir returns path to the com.mojang folder in the preview
7377
// Minecraft build.
7478
func FindPreviewDir() (string, error) {
79+
comMojang := os.Getenv("COM_MOJANG_PREVIEW")
80+
if comMojang != "" {
81+
return comMojang, nil
82+
}
7583
result := filepath.Join(
7684
os.Getenv("LOCALAPPDATA"), "Packages",
7785
"Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe", "LocalState", "games",
@@ -89,6 +97,10 @@ func FindPreviewDir() (string, error) {
8997
// FindEducationDir returns path to the com.mojang folder in the education
9098
// edition Minecraft build.
9199
func FindEducationDir() (string, error) {
100+
comMojang := os.Getenv("COM_MOJANG_EDU")
101+
if comMojang != "" {
102+
return comMojang, nil
103+
}
92104
result := filepath.Join(
93105
os.Getenv("APPDATA"), "Minecraft Education Edition", "games",
94106
"com.mojang")

regolith/filter_python.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ func PythonFilterDefinitionFromObject(id string, obj map[string]interface{}) (*P
3838
return nil, burrito.WrappedErrorf(jsonPropertyTypeError, "script", "string")
3939
}
4040
filter.Script = script
41-
filter.VenvSlot, _ = obj["venvSlot"].(int) // default venvSlot is 0
41+
venvSlot64, _ := obj["venvSlot"].(float64) // default venvSlot is 0.0
42+
filter.VenvSlot = int(venvSlot64)
4243

4344
requirementsObj, ok := obj["requirements"]
4445
if ok {

regolith/filter_remote.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func RemoteFilterDefinitionFromObject(id string, obj map[string]interface{}) (*R
4646
return nil, burrito.WrappedErrorf(jsonPropertyTypeError, "version", "string")
4747
}
4848
result.Version = version
49-
result.VenvSlot, _ = obj["venvSlot"].(int) // default venvSlot is 0
49+
venvSlot64, _ := obj["venvSlot"].(float64) // default venvSlot is 0.0
50+
result.VenvSlot = int(venvSlot64)
5051

5152
return result, nil
5253
}

0 commit comments

Comments
 (0)