File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1104,18 +1104,15 @@ is_dir () {
11041104 # Check whether a path is a directory. If the path doesn't exist, just continue.
11051105 # Similar to pathtype(), but that one quits with error if the path doesn't exist.
11061106 encoded_path=$( urlencode " $1 " )
1107- command=' $debug && set -x
1108- curl "${curl_authorization[@]}" \
1109- -H "accept: application/json" \
1110- --silent \
1111- -X GET "$api/namespace/$encoded_path"'
1112- if $dry_run ; then
1113- echo " $command "
1114- else
1115- result=$( eval " $command " )
1116- # The result of the grep will be passed on to the calling statement.
1117- echo " $result " | jq -r .fileType | grep --silent ' DIR'
1118- fi
1107+ result=$(
1108+ $debug && set -x
1109+ curl " ${curl_authorization[@]} " \
1110+ -H " accept: application/json" \
1111+ --silent \
1112+ -X GET " $api /namespace/$encoded_path " 2> /dev/null
1113+ )
1114+ # The exit code of the grep will be passed on to the calling statement.
1115+ echo " $result " | jq -r .fileType | grep --silent ' DIR'
11191116}
11201117
11211118
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ test_create_path() {
3737 ( create_path " /test/a" false > ${stdoutF} 2> ${stderrF} )
3838 result=$?
3939 assertFalse " expecting return code of 1 (false)" ${result}
40- grep " ERROR: parent dir '/test' does not exist. To recursivly create dirs, add --recursive" " ${stderrF} " > /dev/null
40+ grep " ERROR: parent dir '/test' does not exist. To recursively create dirs, add --recursive" " ${stderrF} " > /dev/null
4141 assertTrue ' STDERR message incorrect' $?
4242
4343 # Check error handling when max number of directories is exceeded
@@ -147,4 +147,4 @@ oneTimeSetUp() {
147147
148148
149149# Load and run shunit2
150- . shunit2
150+ . shunit2
You can’t perform that action at this time.
0 commit comments