@@ -14,27 +14,27 @@ LogEnvironmentVariables() {
1414
1515# Function to set the Git username and email
1616SetGitUser () {
17- echo " Configuring Git username and email: $GIT_USERNAME -- $GIT_EMAIL "
17+ echo " Configuring Git username and email: $GIT_USERNAME -- $GIT_EMAIL " >&2
1818 git config --global user.name " $GIT_USERNAME " || { echo " Failed to configure Git username" ; exit 1; }
1919 git config --global user.email " $GIT_EMAIL " || { echo " Failed to configure Git email" ; exit 1; }
2020}
2121
2222# Function to add github.com to known SSH hosts
2323AddGithubToKnownHosts () {
24- echo " Adding github.com to known SSH hosts"
24+ echo " Adding github.com to known SSH hosts" >&2
2525 mkdir -p ~ /.ssh
2626 ssh-keyscan github.com >> ~ /.ssh/known_hosts || { echo " Failed to add github.com to known hosts" ; exit 1; }
2727}
2828
2929# Function to clone the source repository
3030CloneSourceRepo () {
31- echo " Cloning the $CIRCLE_BRANCH branch of source repository ($CIRCLE_REPOSITORY_URL ) to $SOURCE_REPO_DIRECTORY "
31+ echo " Cloning the $CIRCLE_BRANCH branch of source repository ($CIRCLE_REPOSITORY_URL ) to $SOURCE_REPO_DIRECTORY " >&2
3232 git clone --branch " $CIRCLE_BRANCH " " $CIRCLE_REPOSITORY_URL " " $SOURCE_REPO_DIRECTORY " || { echo " Failed to clone source repository" ; exit 1; }
3333}
3434
3535# Function to clone the target repository
3636CloneTargetRepo () {
37- echo " Cloning target repository from $TARGET_REPO to $TARGET_REPO_DIRECTORY "
37+ echo " Cloning target repository from $TARGET_REPO to $TARGET_REPO_DIRECTORY " >&2
3838 git clone " $TARGET_REPO " " $TARGET_REPO_DIRECTORY " || { echo " Failed to clone target repository" ; exit 1; }
3939 ls " $TARGET_REPO_DIRECTORY "
4040}
@@ -43,12 +43,10 @@ CloneTargetRepo() {
4343ORB_TEST_ENV=" bats-core"
4444if [ " ${0#* " $ORB_TEST_ENV " } " = " $0 " ]; then
4545 LogEnvironmentVariables
46- echo " Script is being executed directly"
46+ echo " Script is being executed directly" >&2
4747
4848 SetGitUser
4949 AddGithubToKnownHosts
5050 CloneSourceRepo
5151 CloneTargetRepo
52- else
53- echo " Script is being sourced"
5452fi
0 commit comments