Skip to content

Commit 2f317e8

Browse files
committed
fix test
1 parent 8f715c0 commit 2f317e8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

parse-config.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ load_dir() {
2929

3030
# $3, is the numbers of characters to strip in front of the key
3131
KEY="${KEY:$3}"
32+
33+
# Removes the application.$application_name prefix if it exists
34+
if [[ "$KEY" == "application.$APPLICATION_NAME."* ]]; then
35+
KEY=${KEY#"application.$APPLICATION_NAME."}
36+
fi
37+
38+
# Removes the .terraform suffix if it exists
39+
if [[ "$KEY" == *".terraform" ]]; then
40+
KEY=${KEY%".terraform"}
41+
fi
3242

3343
# Removes the infrastructure.global. prefix if it exists
3444
if [[ "$KEY" == "infrastructure.global."* ]]; then
@@ -49,16 +59,6 @@ load_dir() {
4959
if [[ "$KEY" == "application."* ]]; then
5060
KEY=${KEY#"application."}
5161
fi
52-
53-
# Removes the application.$application_name prefix if it exists
54-
if [[ "$KEY" == "application.$APPLICATION_NAME."* ]]; then
55-
KEY=${KEY#"application.$APPLICATION_NAME."}
56-
fi
57-
58-
# Removes the .terraform suffix if it exists
59-
if [[ "$KEY" == *".terraform" ]]; then
60-
KEY=${KEY%".terraform"}
61-
fi
6262

6363
log "source=$FILENAME destination=$KEY"
6464

0 commit comments

Comments
 (0)