2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 16:14:12 +00:00

Merge pull request #1421 from gavindsouza/bench-no_cache

fix(cli): Setup chdir patch earlier
This commit is contained in:
gavin 2023-01-24 16:38:03 +05:30 committed by GitHub
commit bcc90c8b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 19 deletions

View File

@ -1,16 +0,0 @@
version = 1
exclude_patterns = [
".*"
]
test_patterns = [
"bench/tests/**"
]
[[analyzers]]
name = "python"
enabled = true
dependency_file_paths = [
"requirements.txt"
]

View File

@ -60,6 +60,7 @@ def execute_cmd(check_for_update=True, command: str = None, logger: Logger = Non
def cli():
setup_clear_cache()
global from_command_line, bench_config, is_envvar_warn_set, verbose
from_command_line = True
@ -75,7 +76,6 @@ def cli():
change_working_directory()
logger = setup_logging()
logger.info(command)
setup_clear_cache()
bench_config = get_config(".")

View File

@ -81,7 +81,7 @@ def write_to_env(
) -> None:
site_name = site or ""
example_env = get_from_env(wd, "example.env")
erpnext_version = erpnext_version or example_env['ERPNEXT_VERSION']
erpnext_version = erpnext_version or example_env["ERPNEXT_VERSION"]
with open(os.path.join(wd, ".env"), "w") as f:
f.writelines(
[
@ -312,7 +312,9 @@ if __name__ == "__main__":
parser.add_argument(
"--email", help="Add email for the SSL.", required="--prod" in sys.argv
)
parser.add_argument("-v", "--version", help="ERPNext version to install, defaults to latest stable")
parser.add_argument(
"-v", "--version", help="ERPNext version to install, defaults to latest stable"
)
args = parser.parse_args()
if args.dev:
cprint("\nSetting Up Development Instance\n", level=2)