sargunv / modsman

Minecraft mod manager and updater for the CLI
Apache License 2.0
29 stars 7 forks source link

Upgrade sometimes not deleting old version #5

Closed Madis0 closed 4 years ago

Madis0 commented 4 years ago

I noticed that upgrading to new versions downloads the new JAR/ZIP (resource packs) but keeps the old one intact. For resource packs it may be preferred as the user has to manually enable and order them anyway but for mods it just creates launch errors.

Could you add an argument to delete old after upgraded or a command like modsman-cli clean?

sargunv commented 4 years ago

This used to delete old versions; looking into why that's not the case anymore.

sargunv commented 4 years ago

I'm having trouble reproducing this consistently, although I was able to confirm it once. Could you paste your .modlist.json to help me debug this?

Madis0 commented 4 years ago
{
  "config": {
    "required_game_versions": [
      "1.15"
    ],
    "excluded_game_versions": [
      "Forge"
    ]
  },
  "mods": [
    {
      "project_id": 356244,
      "project_name": "Grass Kiss (Fabric)",
      "file_id": 2855729,
      "file_name": "../grass_kiss-0.2.2.jar",
      "pinned": false
    },
    {
      "project_id": 335493,
      "project_name": "Dynamic FPS",
      "file_id": 2888347,
      "file_name": "../dynamic-fps-1.1.1.jar",
      "pinned": false
    },
    {
      "project_id": 357256,
      "project_name": "Beenfo",
      "file_id": 2860154,
      "file_name": "../beenfo-1.15-fabric0.4.23-1.0.3.jar",
      "pinned": false
    },
    {
      "project_id": 353890,
      "project_name": "Not Enough Crashes",
      "file_id": 2861006,
      "file_name": "../notenoughcrashes-1.2.3+1.15.1.jar",
      "pinned": false
    },
    {
      "project_id": 372124,
      "project_name": "Phosphor (Fabric)",
      "file_id": 2918761,
      "file_name": "../phosphor-fabric-mc1.15.2-0.5.2+build.6.jar",
      "pinned": false
    },
    {
      "project_id": 322385,
      "project_name": "OptiFabric",
      "file_id": 2915748,
      "file_name": "../optifabric-1.0.0-beta8.jar",
      "pinned": false
    },
    {
      "project_id": 317514,
      "project_name": "Mouse Wheelie (Fabric)",
      "file_id": 2922522,
      "file_name": "../mousewheelie-1.4.5+mc1.15.2-pre1.jar",
      "pinned": false
    },
    {
      "project_id": 360438,
      "project_name": "Lithium (Fabric)",
      "file_id": 2904300,
      "file_name": "../lithium-mc1.15.2-fabric-0.4.6-mod.jar",
      "pinned": false
    },
    {
      "project_id": 351393,
      "project_name": "Horse Stats Vanilla (Fabric)",
      "file_id": 2887319,
      "file_name": "../horse-stats-vanilla-1.0.5.jar",
      "pinned": false
    },
    {
      "project_id": 363676,
      "project_name": "Just Map",
      "file_id": 2928852,
      "file_name": "../justmap-1.0.50-1.15.2.jar",
      "pinned": false
    },
    {
      "project_id": 365615,
      "project_name": "Held Item Info",
      "file_id": 2909095,
      "file_name": "../held-item-info-1.1.1.jar",
      "pinned": false
    },
    {
      "project_id": 225179,
      "project_name": "VoxelMap",
      "file_id": 2917135,
      "file_name": "../fabricmod_VoxelMap-1.9.16_for_1.15.2.jar",
      "pinned": false
    },
    {
      "project_id": 248787,
      "project_name": "AppleSkin",
      "file_id": 2840652,
      "file_name": "../appleskin-mc1.15-fabric-1.0.8.jar",
      "pinned": false
    },
    {
      "project_id": 325492,
      "project_name": "Light Overlay (Rift/Forge/Fabric)",
      "file_id": 2931777,
      "file_name": "../LightOverlay-4.4.jar",
      "pinned": false
    },
    {
      "project_id": 310111,
      "project_name": "Roughly Enough Items (REI)",
      "file_id": 2933430,
      "file_name": "RoughlyEnoughItems-3.6.10.jar",
      "pinned": false
    },
    {
      "project_id": 253449,
      "project_name": "Hwyla",
      "file_id": 2931299,
      "file_name": "Hwyla-fabric-1.15.2-1.9.22-73.jar",
      "pinned": false
    },
    {
      "project_id": 308702,
      "project_name": "Mod Menu (Fabric)",
      "file_id": 2902148,
      "file_name": "../modmenu-1.10.2+build.32.jar",
      "pinned": false
    },
    {
      "project_id": 315811,
      "project_name": "ShulkerBoxTooltip",
      "file_id": 2929754,
      "file_name": "../shulkerboxtooltip-2.0.0+1.15.2.jar",
      "pinned": false
    },
    {
      "project_id": 306612,
      "project_name": "Fabric API",
      "file_id": 2898702,
      "file_name": "../fabric-api-0.5.1+build.294-1.15.jar",
      "pinned": false
    }
  ]
}
sargunv commented 4 years ago

Okay, the problem is the "../" in each mod's file name. You can fix it on your end by doing a find/replace for "../" to nothing in your .modlist.json, but I still need to investigate how that happens in the first place.

sargunv commented 4 years ago

Okay, it happens when running modsman-cli discover on the current working directory, but not when running on a different target directory.

sargunv commented 4 years ago

Fixed in 56bcfd8 for next release.

sargunv commented 4 years ago

Released in v0.32.0