mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
320 stars 19 forks source link

error: unrecognized arguments: --work-dir fabric:1.20.1 #203

Closed Xanderplayz16 closed 3 months ago

Xanderplayz16 commented 3 months ago

I am trying to launch the game, but it returns an error. How do I fix this? CMD:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\xande> python -m portablemc start -u aaa --work-dir X:\Desktop\supahlaunchah\splauncher\instances\aaa fabric:1.20.1
usage: portablemc [-h] [--main-dir MAIN_DIR] [--work-dir WORK_DIR] [--timeout TIMEOUT]
                  [--output {human-color,human,machine}] [-v]
                  {search,start,login,logout,show} ...
portablemc: error: unrecognized arguments: --work-dir fabric:1.20.1
PS C:\Users\xande>
Ristovski commented 3 months ago

--work-dir is a global argument and needs to come before start as per the first line of https://github.com/mindstorm38/portablemc?tab=readme-ov-file#commands. Likewise, -u is an arg and needs to come after the start command.

The correct command would be python -m portablemc --work-dir X:\Desktop\supahlaunchah\splauncher\instances\aaa start fabric:1.20.1 -u aaa

Xanderplayz16 commented 3 months ago

Ohhhhh Thanks