diff options
author | brkirch <brkirch@users.noreply.github.com> | 2022-12-01 09:04:14 +0000 |
---|---|---|
committer | brkirch <brkirch@users.noreply.github.com> | 2022-12-01 09:49:49 +0000 |
commit | bef36597cc46671eeb2041b0343bd5e183883eb7 (patch) | |
tree | 7ccb2f20d1abe8c63f04545c456ea8f9d45d0d4b /webui.sh | |
parent | 79953e9b8b0d04868b719452a5b250c450f757b6 (diff) | |
download | stable-diffusion-webui-gfx803-bef36597cc46671eeb2041b0343bd5e183883eb7.tar.gz stable-diffusion-webui-gfx803-bef36597cc46671eeb2041b0343bd5e183883eb7.tar.bz2 stable-diffusion-webui-gfx803-bef36597cc46671eeb2041b0343bd5e183883eb7.zip |
Fix run as root flag
Even though -f enables running webui.sh as root, the -f flag will also be passed to launch.py, causing it to exit with a usage message. This adds a line to launch.py to remove the -f flag if present.
In addition to the above, all the letters in the command line arguments after each '-' were being processed for 'f' and "illegal option" was displayed for each letter that didn't match. Instead, this commit silences those errors and stops processing if the first flag doesn't start with '-f'.
Diffstat (limited to 'webui.sh')
-rwxr-xr-x | webui.sh | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -51,10 +51,11 @@ fi can_run_as_root=0 # read any command line flags to the webui.sh script -while getopts "f" flag +while getopts "f" flag > /dev/null 2>&1 do case ${flag} in f) can_run_as_root=1;; + *) break;; esac done |