From 90c750a6adcba2d2c039eb23c7b7b6ebc4b5327f Mon Sep 17 00:00:00 2001 From: ajasibley <125228925+ajasibley@users.noreply.github.com> Date: Thu, 25 May 2023 02:24:43 -0700 Subject: [PATCH] Added automatic path setting to install-cosmo just recipe. --- justfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 4cb6914b6..1bc11b576 100644 --- a/justfile +++ b/justfile @@ -29,7 +29,14 @@ install-openssl: install-cosmo: @if ! command -v cosmo &> /dev/null; then \ bash -c "$(curl -fsSL https://cosmonic.sh/install.sh)"; \ - . {{scripts_dir}}/update_path.sh; \ + current_shell=$$(basename "$$SHELL"); \ + if [ "$$current_shell" == "bash" ]; then \ + echo "export PATH=\"/Users/nexus/.cosmo/bin:\$$${PATH}\"" >> "${HOME}/.bashrc" && source "${HOME}/.bashrc"; \ + elif [ "$$current_shell" == "zsh" ]; then \ + echo "export PATH=\"/Users/nexus/.cosmo/bin:\$$${PATH}\"" >> "${HOME}/.zshrc" && source "${HOME}/.zshrc"; \ + else \ + echo "Unsupported shell: $$current_shell"; \ + fi; \ fi all: install-nix install-rust install-wasm-target install-openssl install-cosmo