Skip to content

Commit 46929ee

Browse files
Merge pull request #32 from gitbito/BITO-5464-bug-fixes
BITO-5464 bug-fixes in bito action script
2 parents 7847f3f + 9ba26f7 commit 46929ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bito-action-script/bito-actions.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
read_property() {
55
local property_key=$1
66
local property_file=$2
7-
local property_value=$(grep -w "${property_key}" "${property_file}" | cut -d'=' -f2)
8-
echo "${property_value}"
7+
local property_value=$(grep -w "${property_key}" "${property_file}" | cut -d'=' -f2-)
8+
echo "${property_value//\"}"
99
}
1010

1111
# Initialize variables with default empty values
@@ -30,20 +30,22 @@ do
3030
case $arg in
3131
agent_instance_url=*)
3232
agent_instance_url="${arg#*=}"
33+
agent_instance_url="${agent_instance_url//\"}"
3334
;;
3435
agent_instance_secret=*)
3536
agent_instance_secret="${arg#*=}"
37+
agent_instance_secret="${agent_instance_secret//\"}"
3638
;;
3739
git_url=*)
3840
git_url="${arg#*=}"
41+
git_url="${git_url//\"}"
3942
;;
4043
*)
4144
echo "Unknown argument: $arg"
4245
;;
4346
esac
4447
done
4548

46-
4749
# Check if any of the required properties are empty
4850
if [ -z "$agent_instance_url" ]; then
4951
echo "Error: agent_instance_url is empty"

0 commit comments

Comments
 (0)