I recently made a bench update in a local instance and all the bench commands like: bench update, bench init, bench migrate, etc stopped working. throwing the [Error 2] No such file and directory: ‘./sites’. The last commit that modified the bench/cli.py file prevent the commands reach the bench_commands() function.
Please fix it.
Your error usually means your Current Working Directory is incorrect. Some Bench commands only work correctly, if executed from the proper directory.
When launching your Bench commands, you want your working directory to be the parent of “./sites”. Which is usually “frappe-bench”.
As an example, on my laptop, that full path is home/myuser/erpnext/development/frappe-bench/.