Skip to content

Commit 80a0802

Browse files
committed
#skip-ci fixing java args to not include decimals
1 parent e5e1ef4 commit 80a0802

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/providers/InstallFabric.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ export async function installFabric(ref: Ref) {
7575
data['profiles'][map.value.versionName]['name'] = map.value.versionName;
7676
data['profiles'][map.value.versionName]['icon'] =
7777
launcher.value.launcher_icon; // in base64
78+
// convert to MB to handle fractional values (eg. 10.5GB)
79+
const memoryInMb = Math.round(memory.value * 1024);
7880
data['profiles'][map.value.versionName][
7981
'javaArgs'
80-
] = `-Xmx${memory.value}G`;
82+
] = `-Xmx${memoryInMb}M`;
8183

8284
fs.writeFileSync(profileFilePath, JSON.stringify(data), 'utf-8');
8385

0 commit comments

Comments
 (0)