diff --git a/piston.py b/piston.py index 638522f..d8102ef 100644 --- a/piston.py +++ b/piston.py @@ -63,7 +63,7 @@ def main(modpack_path): logging.info(f"Modpack {modpack_name} ({modpack_id}) not found in install list - creating...") install_list[modpack_id] = { 'created': datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z', - 'gameDir': install_path, + 'gameDir': str(install_path), 'icon': 'Redstone_Block', 'javaArgs': '-Xmx4G ' '-XX:+UnlockExperimentalVMOptions ' @@ -80,7 +80,7 @@ def main(modpack_path): full_profile_setup = json.load(f) with open(get_minecraft_folder(sys_root) / 'launcher_profiles.json', 'w') as f: full_profile_setup['profiles'] = install_list - json.dump(full_profile_setup, f) + json.dump(full_profile_setup, f, indent=2) logging.info(f"Successfully added mod to installed profile list.") # Validate file structure compared to mod zip @@ -92,4 +92,6 @@ def main(modpack_path): if __name__ == '__main__': + logging.basicConfig() + logging.getLogger().setLevel(logging.DEBUG) main(PurePath() / 'testing_data' / 'FusterCluck_test.zip')