diff --git a/eburger/utils/installers.py b/eburger/utils/installers.py index bbadb6d..cd136a9 100644 --- a/eburger/utils/installers.py +++ b/eburger/utils/installers.py @@ -121,11 +121,6 @@ def install_hardhat_if_not_found(): shell=True, live_output=True, ) - run_command( - construct_sourceable_nvm_string("npm install -g yarn"), - shell=True, - live_output=True, - ) run_command( construct_sourceable_nvm_string("npx -v"), shell=True, @@ -139,6 +134,11 @@ def install_hardhat_if_not_found(): try: if os.path.isfile(os.path.join(settings.project_root, "yarn.lock")): + run_command( + construct_sourceable_nvm_string("npm install -g yarn"), + shell=True, + live_output=True, + ) run_command( construct_sourceable_nvm_string("yarn add --dev hardhat"), directory=settings.project_root,