getopt 与 jdbc 连接字符串

问题描述

在 Windows 10 上将 git 升级到新版本后遇到一个奇怪的问题。 getopt 无法将连接字符串解析为发送到 getopt 的选项之一。请在下面找到版本详细信息 -

git -> git 版本 2.31.0.windows.1

getopt -> util-linux 2.35.2 中的 getopt

以下命令工作正常 -

getopt -a -n someapp.sh -o h::c:u:p:l:f:t:d: --longoptions help::,connect-string:,username:,password:,list-file:,file:,db-type:,debug-level: -- -c jdbc://dbhost:p5439/db -u usrnm -p pswrd -f ./somefilepath.xml

注意 jdbc 连接字符串中的 p,即

p5439

Get Opt successfully parsing

现在当我从端口号中删除 p 时,命令什么都不输出 -

getopt -a -n someapp.sh -o h::c:u:p:l:f:t:d: --longoptions help::,debug-level: -- "-c jdbc://dbhost:5439/db -u usrnm -p pswrd -f ./somefilepath.xml"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)