I downloaded the karate-demo project and made this small changes:
in karate-config.js the first line of the function:
karate.log("Environment from command line: ",karate.env);
then I execute from terminal
mvn test -Dtest=InfoRunner -DargLine="-Dkarate.env=web"
in the output I should get:
Environment from command line: web
but it shown :
Environment from command line: null
for some reason is not passing the karate.env variable