Skip to content

Conversation

@lxrite
Copy link
Owner

@lxrite lxrite commented Nov 4, 2023

支持命令行参数。

1.0版本ahpc和ahps总是从固定的路径加载配置文件,从1.1开始支持通过-c, --config参数指定配置文件路径。

$ ./ahpc -h
Usage: ahpc [options]

options:
  -h, --help              Show this help message and exit
  -v, --version           Print the program version and exit
  -c, --config PATH       Configuration file path (default: client.json)
$ ./ahps -h
Usage: ahps [options]

options:
  -h, --help              Show this help message and exit
  -v, --version           Print the program version and exit
  -c, --config PATH       Configuration file path (default: server.json)

默认配置文件路径改变
1.0版本
Windows系统从EXE文件所在的目录读取client.json和sever.json配置文件
非Windows系统从~/.ahpc/client.json和~/.ahps/server.json读取配置文件
1.1版本
若没有通过参数指定配置文件,默认配置文件为当前工作目录$PWD下的client.json和server.json

@lxrite lxrite added this to the 1.1 milestone Nov 4, 2023
@lxrite lxrite merged commit f369784 into master Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants