Skip to content

Commit d047632

Browse files
authored
Fix timing command (#168)
* timing was putting an extra "http" into the url which caused it to not load correctly. * fixes #167
1 parent c6389c5 commit d047632

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cromshell

+6-2
Original file line numberDiff line numberDiff line change
@@ -1124,10 +1124,14 @@ function timing()
11241124
local server_url_for_browser=${2}
11251125
turtle
11261126
echo "Opening timing information in your default web browser for job ID: ${id}"
1127-
if [[ ${server_url_for_browser} != "http*" ]]; then
1127+
echo "${server_url_for_browser}" | grep -q "^http"
1128+
r=$?
1129+
if [ $r -ne 0 ]; then
11281130
server_url_for_browser="http://${server_url_for_browser}"
11291131
fi
1130-
open ${server_url_for_browser}/api/workflows/v1/${id}/timing
1132+
server_url_for_browser=${server_url_for_browser}/api/workflows/v1/${id}/timing
1133+
open ${server_url_for_browser}
1134+
echo "URL is: ${server_url_for_browser}"
11311135
return $?
11321136
}
11331137

0 commit comments

Comments
 (0)