Merge pull request #10317 from AUTOMATIC1111/fix-COMMANDLINE_ARGS--data-dir

fix --data-dir ignored when launching via webui-user.bat COMMANDLINE_ARGS
This commit is contained in:
AUTOMATIC1111 2023-05-12 16:50:42 +03:00 committed by GitHub
commit 54c84e63b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -3,16 +3,12 @@ import subprocess
import os
import sys
import importlib.util
import shlex
import platform
import json
from modules import cmd_args
from modules.paths_internal import script_path, extensions_dir
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
sys.argv += shlex.split(commandline_args)
args, _ = cmd_args.parser.parse_known_args()
python = sys.executable

View File

@ -2,6 +2,11 @@
import argparse
import os
import sys
import shlex
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
sys.argv += shlex.split(commandline_args)
modules_path = os.path.dirname(os.path.realpath(__file__))
script_path = os.path.dirname(modules_path)