HMCL
HMCL copied to clipboard
Not a valid identifier in bash script (macOS)
启动器版本 Launcher Version
3.5.2.220
平台 Platform
macOS 12.4
Java
Temurin 17
游戏版本 Game Version
1.18.2
对游戏所做的修改 Modifications Made to the Game
Fabric
游戏崩溃报告 Game Crash Report
No response
启动器崩溃报告 Launcher Crash Report
No response
启动器日志文件 Launcher Log File
No response
问题描述 Problem Description
使用生成脚本功能启动,报:
/Users/----/Desktop/Untitled.sh: line 3: export: `Support/minecraft': not a valid identifier
/Users/----/Desktop/Untitled.sh: line 6: export: `Support/minecraft/versions/fabric-loader-0.13.2-1.18.1': not a valid identifier
原因是脚本顶端赋值没有加引号:
export INST_JAVA=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java
export INST_MC_DIR=/Users/----/Library/Application Support/minecraft
export INST_NAME=fabric-loader-0.13.2-1.18.1
export INST_ID=fabric-loader-0.13.2-1.18.1
export INST_DIR=/Users/----/Library/Application Support/minecraft/versions/fabric-loader-0.13.2-1.18.1
export INST_FABRIC=1
这个修起来需要改俩文件(CommandBuilder 把 parseShell/quoteShell 变 public,然后启动器主文件去使用),网页上有点麻烦。我回头 clone 吧,也好 rebase 一下清理我那几个要 squash 的。
嘛当然这些变量都没用上,所以也没啥影响(