mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
feat: add config CompatPOSIXShell (#5945)
在POSIX shell标准中,双引号内的`$`内的内容将被提前展开,这将导致`CloseDown`任务失效。大多数*nix shell的实现都遵守这一标准,所以这里添加了一个配置`CompatPOSIXShell`,将`Stop`字段相应的双引号换成单引号,以防止CloseDown在使用符合上述标准shell的系统上失效。 另见: #5920,因为那个PR已经合并了,所以我新提了一个PR。
This commit is contained in:
@@ -145,6 +145,11 @@
|
||||
"stop": "[Adb] -s [AdbSerial] shell 'PACKAGE_NAME=$(dumpsys activity activities 2>/dev/null | grep -E \"(packageName|Activities)=[^\\n]+arknights\" 2>/dev/null | grep -i -o -E \"[^= ]*arknights[^ /\\n]*\" | head -n 1); if [ -n \"$PACKAGE_NAME\" ]; then echo \"Closing $PACKAGE_NAME\"; am force-stop $PACKAGE_NAME; else echo \"app not running or arknights package name not found\"; fi'",
|
||||
"screencapRawWithGzip": ""
|
||||
},
|
||||
{
|
||||
"configName": "CompatPOSIXShell",
|
||||
"baseConfig": "General",
|
||||
"stop": "[Adb] -s [AdbSerial] shell 'PACKAGE_NAME=$(dumpsys activity activities 2>/dev/null | grep -E \"(packageName|Activities)=[^\\n]+arknights\" 2>/dev/null | grep -i -o -E \"[^= ]*arknights[^ /\\n]*\" | head -n 1); if [ -n \"$PACKAGE_NAME\" ]; then echo \"Closing $PACKAGE_NAME\"; am force-stop $PACKAGE_NAME; else echo \"app not running or arknights package name not found\"; fi'"
|
||||
},
|
||||
{
|
||||
"configName": "GeneralWithoutScreencapErr",
|
||||
"baseConfig": "General",
|
||||
|
||||
Reference in New Issue
Block a user