Skip to content

Commit 5e91f5a

Browse files
authored
Return at error notice for ds --version if the branch does not exist (GhostWriters#2003)
1 parent 6b272ae commit 5e91f5a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

main.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,15 @@ main() {
12431243
exit
12441244
fi
12451245
if [[ -v VERSION ]]; then
1246-
echo "${APPLICATION_NAME} [$(ds_version "${VERSION}")]"
1246+
local Version
1247+
VersionString="$(ds_version "${VERSION}")"
1248+
if [[ -n ${VersionString} ]]; then
1249+
echo "${APPLICATION_NAME} [${VersionString}]"
1250+
else
1251+
local Branch
1252+
Branch="${VERSION:-$(ds_branch)}"
1253+
error "DockSTARTer branch ${Branch} does not exist."
1254+
fi
12471255
exit
12481256
fi
12491257
# Run Menus

0 commit comments

Comments
 (0)