From 5f8f79fc3e7f1c259f443381df09bf687fa83302 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 25 Aug 2023 09:15:21 +0530 Subject: [PATCH] fix: live editor exists error --- scripts/editor.bash | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/editor.bash b/scripts/editor.bash index 836353b13..ee7792672 100755 --- a/scripts/editor.bash +++ b/scripts/editor.bash @@ -8,11 +8,14 @@ pushd packages/mermaid npm link popd -# Clone the Mermaid Live Editor repository -git clone https://github.com/mermaid-js/mermaid-live-editor.git - -# Change to the repository directory -cd mermaid-live-editor +# Clone or update the Mermaid Live Editor repository +if [ ! -d "mermaid-live-editor" ]; then + git clone --single-branch https://github.com/mermaid-js/mermaid-live-editor.git + cd mermaid-live-editor +else + cd mermaid-live-editor + git pull +fi # Link local mermaid to live editor npm link mermaid