passing --vars in command line is not working

Prob: Project variable is not getting overwritten when I pass it through command line

As shown in below screen env variable is set to dev in project.yml file. but i ran below command to overwrite variable. but in the output i am still getting dev printed in one of the macro.

dbt run --select model --vars ‘{“env”:“prod”}’

Also can i pass --vars to dbt compile?

Try putting a space after the colon

'{"env": "prod"}'

About the compile question, it should work as well