Fossil SCM
The "fossil chat send" command should throw an error if there are any unrecognized command-line options.
Commit
904a5a5612e004269dec81448ebe1c7a335ca3449a33a1a5cfcda0574ec48323
Parent
1e81049063cc883…
1 file changed
+2
+2
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -741,10 +741,11 @@ | ||
| 741 | 741 | ); |
| 742 | 742 | } |
| 743 | 743 | if( g.argc==2 ){ |
| 744 | 744 | const char *zBrowser = fossil_web_browser(); |
| 745 | 745 | char *zCmd; |
| 746 | + verify_all_options(); | |
| 746 | 747 | if( zBrowser==0 ) return; |
| 747 | 748 | #ifdef _WIN32 |
| 748 | 749 | zCmd = mprintf("%s %s/chat?cli &", zBrowser, zUrl); |
| 749 | 750 | #else |
| 750 | 751 | zCmd = mprintf("%s \"%s/chat?cli\" &", zBrowser, zUrl); |
| @@ -760,10 +761,11 @@ | ||
| 760 | 761 | char zBoundary[80]; |
| 761 | 762 | sqlite3_uint64 r[3]; |
| 762 | 763 | if( zFilename==0 && zMsg==0 ){ |
| 763 | 764 | fossil_fatal("must have --message or --file or both"); |
| 764 | 765 | } |
| 766 | + verify_all_options(); | |
| 765 | 767 | i = (int)strlen(g.url.path); |
| 766 | 768 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 767 | 769 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 768 | 770 | blob_init(&up, 0, 0); |
| 769 | 771 | blob_init(&down, 0, 0); |
| 770 | 772 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -741,10 +741,11 @@ | |
| 741 | ); |
| 742 | } |
| 743 | if( g.argc==2 ){ |
| 744 | const char *zBrowser = fossil_web_browser(); |
| 745 | char *zCmd; |
| 746 | if( zBrowser==0 ) return; |
| 747 | #ifdef _WIN32 |
| 748 | zCmd = mprintf("%s %s/chat?cli &", zBrowser, zUrl); |
| 749 | #else |
| 750 | zCmd = mprintf("%s \"%s/chat?cli\" &", zBrowser, zUrl); |
| @@ -760,10 +761,11 @@ | |
| 760 | char zBoundary[80]; |
| 761 | sqlite3_uint64 r[3]; |
| 762 | if( zFilename==0 && zMsg==0 ){ |
| 763 | fossil_fatal("must have --message or --file or both"); |
| 764 | } |
| 765 | i = (int)strlen(g.url.path); |
| 766 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 767 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 768 | blob_init(&up, 0, 0); |
| 769 | blob_init(&down, 0, 0); |
| 770 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -741,10 +741,11 @@ | |
| 741 | ); |
| 742 | } |
| 743 | if( g.argc==2 ){ |
| 744 | const char *zBrowser = fossil_web_browser(); |
| 745 | char *zCmd; |
| 746 | verify_all_options(); |
| 747 | if( zBrowser==0 ) return; |
| 748 | #ifdef _WIN32 |
| 749 | zCmd = mprintf("%s %s/chat?cli &", zBrowser, zUrl); |
| 750 | #else |
| 751 | zCmd = mprintf("%s \"%s/chat?cli\" &", zBrowser, zUrl); |
| @@ -760,10 +761,11 @@ | |
| 761 | char zBoundary[80]; |
| 762 | sqlite3_uint64 r[3]; |
| 763 | if( zFilename==0 && zMsg==0 ){ |
| 764 | fossil_fatal("must have --message or --file or both"); |
| 765 | } |
| 766 | verify_all_options(); |
| 767 | i = (int)strlen(g.url.path); |
| 768 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 769 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 770 | blob_init(&up, 0, 0); |
| 771 | blob_init(&down, 0, 0); |
| 772 |