File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,28 @@ test_util.is_exported() {
12
12
return 1
13
13
fi
14
14
else
15
- if declare -x | while read -r line; do
16
- case " $line " in
17
- " declare -x $variable_name " =* ) return 10 ;;
18
- esac
19
- done ; then
20
- return 1
21
- else
22
- if (( $? == 10 )) ; then
23
- return 0
24
- else
25
- return 1
26
- fi
27
- fi
15
+ local output=
16
+ output=" $( declare -p " $variable_name " ) "
17
+
18
+ case " $output " in
19
+ " declare -x $variable_name " =* ) return 0 ;;
20
+ esac
21
+
22
+ return 1
23
+
24
+ # if declare -x | while read -r line; do
25
+ # case "$line" in
26
+ # "declare -x $variable_name"=*) return 10 ;;
27
+ # esac
28
+ # done; then
29
+ # return 1
30
+ # else
31
+ # if (($? == 10)); then
32
+ # return 0
33
+ # else
34
+ # return 1
35
+ # fi
36
+ # fi
28
37
fi
29
38
}
30
39
You can’t perform that action at this time.
0 commit comments