Gitbash #2508
-
aqua info$ aqua info
{
"version": "2.16.0",
"commit_hash": "70f84d66ba9af98008360fd7b846094f020b4c6f",
"os": "windows",
"arch": "amd64",
"pwd": "C:\\Users\\XDLMARTI\\repos\\work\\czm",
"root_dir": "C:\\Users\\XDLMARTI\\AppData\\Local\\aquaproj-aqua",
"env": {
"AQUA_GLOBAL_CONFIG": "C:\\Users\\XDLMARTI\\AppData\\Local\\aquaproj-aqua\\aqua.yaml",
"AQUA_POLICY_CONFIG": "C:\\Users\\XDLMARTI\\AppData\\Local\\aquaproj-aqua\\aqua-policy.yaml",
"AQUA_ROOT_DIR": "C:\\Users\\XDLMARTI\\AppData\\Local\\aquaproj-aqua"
},
"config_files": []
} OS (Windows, Linux, macOS, etc): Windows 10, Gitbash Overview
I assume that this applies to all tools that allow arguments with expressions or templates that also offer a pipe operator. How to reproduceaqua.yaml ---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
checksum:
# https://aquaproj.github.io/docs/reference/checksum/
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.54.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: jqlang/[email protected] Executed command and output $ curl -sSfL https://jsonplaceholder.typicode.com/todos | jq '.[] | .id'
jq: error: Could not open file |: Invalid argument
jq: error: Could not open file .id: No such file or directory Debug output$ # this example works well
$ curl -sSfL https://jsonplaceholder.typicode.com/todos | jq '.[0].id'
1
$ # lets use jq's pipe operator - result should be the same as before
$ curl -sSfL https://jsonplaceholder.typicode.com/todos | jq '.[0] | .id'
DEBU[0000] match the version_constraint aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_semver=1.6 pack
age_version=jq-1.6 program=aqua registry_name=standard version_constraint="semver(\">= 1.5\")"
DEBU[0000] installing the package aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua registry=standard
DEBU[0000] check if the package is already installed aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua registry=standard
DEBU[0000] check the permission aqua_version=2.16.0 env=windows/amd64 exe_name=jq file_name=jq package_name=jqlang/jq package_ve
rsion=jq-1.6 program=aqua registry=standard
DEBU[0000] add the permission to execute the command aqua_version=2.16.0 env=windows/amd64 exe_name=jq file_name=jq package_name=jqlang/jq package_ve
rsion=jq-1.6 program=aqua registry=standard
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=1
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=2
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=3
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=4
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=5
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=6
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=7
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=8
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=9
DEBU[0000] check if exec file exists aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
DEBU[0000] command isn't found. wait for lazy install aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua retry_count=10
DEBU[0000] execute the command aqua_version=2.16.0 env=windows/amd64 exe_name=jq package_name=jqlang/jq package_version=jq-1.6
program=aqua
jq: error: Could not open file |: Invalid argument
jq: error: Could not open file .id: No such file or directory
DEBU[0000] command failed aqua_version=2.16.0 env=windows/amd64 error="exit status 2" exe_name=jq exit_code=2 package_name
=jqlang/jq package_version=jq-1.6 program=aqua
Expected behaviourWith additional quotes (at least arround the second arg) -- #!/usr/bin/env bash
exec aqua exec -- "$0" "$@" $ # it works in Gitbash again
$ curl -SfL https://jsonplaceholder.typicode.com/todos | jq '.[0] | .id'
1 Actual behavioursee above Important FactoidsNo response Reference |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thank you for your report. $ aqua info
{
"version": "2.16.0",
"commit_hash": "70f84d66ba9af98008360fd7b846094f020b4c6f",
"os": "windows",
"arch": "amd64",
"pwd": "C:\\Users\\devnu\\Documents\\test\\aqua\\2508",
"root_dir": "C:\\Users\\devnu\\AppData\\Local\\aquaproj-aqua",
"env": {},
"config_files": [
{
"path": "C:\\Users\\devnu\\Documents\\test\\aqua\\2508\\aqua.yaml"
}
]
} aqua.yaml registries:
- type: standard
ref: v4.92.0
packages:
- name: jqlang/[email protected] $ curl -sSfL https://jsonplaceholder.typicode.com/todos | jq '.[] | .id'
jq: error: Could not open file |: Invalid argument
jq: error: Could not open file .id: No such file or directory If I execute jq directly by $ curl -sSfL https://jsonplaceholder.typicode.com/todos | $(aqua which jq) '.[] | .id' And if I execute jq by $ curl -sSfL https://jsonplaceholder.typicode.com/todos | aqua exec -- jq '.[] | .id' $ which jq
/c/Users/devnu/AppData/Local/aquaproj-aqua/bin/jq
$ cat "$(which jq)"
#!/usr/bin/env bash
exec aqua exec -- $0 $@ |
Beta Was this translation helpful? Give feedback.
aqua v2.19.0 is out 🎉
https://github.com/aquaproj/aqua/releases/tag/v2.19.0