Skip to content

Commit b71a098

Browse files
committed
Add error message for unsupported commands.
1 parent 72c6a91 commit b71a098

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git.ado

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ syntax anything(name=gitArgs id="git command and arguments")
5454
}
5555
local gitParam1 = trim(subinstr("`gitArgs'","`gitCommand'","",1))
5656

57+
if("`gitCommand'" != "install" & "`gitCommand'" != "uninstall" & "`gitCommand'" != "update" & "`gitCommand'" != "list"){
58+
di as red "`gitCommand' is not a valid git command"
59+
di as yellow "Expected one of: install, uninstal, update, list."
60+
exit
61+
}
62+
5763
/* Translate "install" to "clone". "install" is used to be consistent with the ssc command */
5864
if("`gitCommand'" == "install"){
5965

0 commit comments

Comments
 (0)