From 85767829cb8f893eb2b88ba649a6ee485c8f77be Mon Sep 17 00:00:00 2001 From: ahjota <3588606+ahjota@users.noreply.github.com> Date: Tue, 7 Sep 2021 18:58:34 -0700 Subject: [PATCH] [R] Fix shellcheck violations in git_push.sh.template (#10345) * shellcheck * regenerated sample --- .../src/main/resources/r/git_push.sh.mustache | 4 ++-- samples/client/petstore/R/git_push.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache index 305f9c115ce..0e3776ae6dd 100755 --- a/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/samples/client/petstore/R/git_push.sh b/samples/client/petstore/R/git_push.sh index 18f86b99e82..f53a75d4fab 100644 --- a/samples/client/petstore/R/git_push.sh +++ b/samples/client/petstore/R/git_push.sh @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi