diff --git a/.claude/skills/db-create/scripts/db-create.py b/.claude/skills/db-create/scripts/db-create.py index f4b5eff8c..7919f68b9 100644 --- a/.claude/skills/db-create/scripts/db-create.py +++ b/.claude/skills/db-create/scripts/db-create.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-create v1.12 — Create 1C information base +# db-create v1.13 — Create 1C information base # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -332,11 +332,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-dump-cf/scripts/db-dump-cf.py b/.claude/skills/db-dump-cf/scripts/db-dump-cf.py index 4314542c8..287b79ee1 100644 --- a/.claude/skills/db-dump-cf/scripts/db-dump-cf.py +++ b/.claude/skills/db-dump-cf/scripts/db-dump-cf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-dump-cf v1.14 — Dump 1C configuration to CF file +# db-dump-cf v1.15 — Dump 1C configuration to CF file # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-dump-dt/scripts/db-dump-dt.py b/.claude/skills/db-dump-dt/scripts/db-dump-dt.py index 9d2d54e3b..30690f502 100644 --- a/.claude/skills/db-dump-dt/scripts/db-dump-dt.py +++ b/.claude/skills/db-dump-dt/scripts/db-dump-dt.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-dump-dt v1.13 — Dump 1C information base to DT file +# db-dump-dt v1.14 — Dump 1C information base to DT file # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-dump-xml/scripts/db-dump-xml.py b/.claude/skills/db-dump-xml/scripts/db-dump-xml.py index e7f2ae7e6..a5a506c28 100644 --- a/.claude/skills/db-dump-xml/scripts/db-dump-xml.py +++ b/.claude/skills/db-dump-xml/scripts/db-dump-xml.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-dump-xml v1.18 — Dump 1C configuration to XML files +# db-dump-xml v1.19 — Dump 1C configuration to XML files # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -404,11 +404,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-load-cf/scripts/db-load-cf.py b/.claude/skills/db-load-cf/scripts/db-load-cf.py index 5b034b079..05c77dd96 100644 --- a/.claude/skills/db-load-cf/scripts/db-load-cf.py +++ b/.claude/skills/db-load-cf/scripts/db-load-cf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-load-cf v1.15 — Load 1C configuration from CF file +# db-load-cf v1.16 — Load 1C configuration from CF file # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-load-dt/scripts/db-load-dt.py b/.claude/skills/db-load-dt/scripts/db-load-dt.py index a36e42b5f..413cafbcf 100644 --- a/.claude/skills/db-load-dt/scripts/db-load-dt.py +++ b/.claude/skills/db-load-dt/scripts/db-load-dt.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-load-dt v1.14 — Load 1C information base from DT file +# db-load-dt v1.15 — Load 1C information base from DT file # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-load-git/scripts/db-load-git.py b/.claude/skills/db-load-git/scripts/db-load-git.py index fbd8a0f99..d8ec0530b 100644 --- a/.claude/skills/db-load-git/scripts/db-load-git.py +++ b/.claude/skills/db-load-git/scripts/db-load-git.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-load-git v1.24 — Load Git changes into 1C database +# db-load-git v1.25 — Load Git changes into 1C database # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -425,11 +425,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-load-xml/scripts/db-load-xml.py b/.claude/skills/db-load-xml/scripts/db-load-xml.py index 36aa2c96d..d0a73f1a2 100644 --- a/.claude/skills/db-load-xml/scripts/db-load-xml.py +++ b/.claude/skills/db-load-xml/scripts/db-load-xml.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-load-xml v1.25 — Load 1C configuration from XML files +# db-load-xml v1.26 — Load 1C configuration from XML files # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -425,11 +425,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/db-repo/scripts/db-repo.py b/.claude/skills/db-repo/scripts/db-repo.py index d2b00e33f..a3429d81d 100644 --- a/.claude/skills/db-repo/scripts/db-repo.py +++ b/.claude/skills/db-repo/scripts/db-repo.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-repo v1.11 — 1C configuration repository operations +# db-repo v1.12 — 1C configuration repository operations # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills # NB: движок только 1cv8 — ibcmd работу с хранилищем не поддерживает (нет такого режима). """Работа с хранилищем конфигурации 1С. @@ -290,11 +290,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) @@ -673,20 +682,6 @@ COMMAND_ALIASES = { } -def arg_value(value): - """Значение отдельного аргумента. - - На Windows команда склеивается в одну строку (см. run_v8), поэтому значение с пробелом - обязано нести собственные кавычки. На POSIX аргументы уходят списком — там кавычки стали бы - ЧАСТЬЮ значения. Проверено на darwin: многословный -comment с кавычками платформа теряет - целиком, однословный без кавычек доходит. - - Ключи вида /F"путь" и /N"имя" собираются отдельно: там кавычки внутри токена требует сам - разборщик 1С, и они нужны на обеих ОС. - """ - return '"%s"' % value if os.name == "nt" else "%s" % value - - def resolve_command(raw): c = raw.strip().lower() # unbind отличается от unlock одной буквой, а последствия разные: отмена захвата против @@ -1049,9 +1044,9 @@ def main(): # --- Соединение --- arguments = ["DESIGNER"] if args.InfoBaseServer and args.InfoBaseRef: - arguments += ["/S", arg_value("%s/%s" % (args.InfoBaseServer, args.InfoBaseRef))] + arguments += ["/S", '"%s/%s"' % (args.InfoBaseServer, args.InfoBaseRef)] else: - arguments += ["/F", arg_value(args.InfoBasePath)] + arguments += ["/F", '"%s"' % args.InfoBasePath] if args.UserName: arguments.append('/N"%s"' % args.UserName) if args.Password: @@ -1067,12 +1062,12 @@ def main(): arguments.append(key) if cmd in ("dump-cfg", "report"): - arguments.append(arg_value(args.OutputFile)) + arguments.append('"%s"' % args.OutputFile) if cmd in object_aware and requested: objects_xml = write_objects_list_xml( requested, os.path.join(temp_dir, "objects.xml"), args.WithChildren) - arguments += ["-Objects", arg_value(objects_xml)] + arguments += ["-Objects", '"%s"' % objects_xml] if cmd == "lock": if args.Revised: @@ -1084,7 +1079,7 @@ def main(): if args.Comment: # Многострочный комментарий задаётся своим -comment на каждую строку. for line in args.Comment.splitlines(): - arguments += ["-comment", arg_value(line)] + arguments += ["-comment", '"%s"' % line] if args.KeepLocked: arguments.append("-keepLocked") if args.Force: @@ -1113,9 +1108,9 @@ def main(): if args.NEnd: arguments += ["-NEnd", args.NEnd] if args.DateBegin: - arguments += ["-DateBegin", arg_value(args.DateBegin)] + arguments += ["-DateBegin", '"%s"' % args.DateBegin] if args.DateEnd: - arguments += ["-DateEnd", arg_value(args.DateEnd)] + arguments += ["-DateEnd", '"%s"' % args.DateEnd] if args.GroupByObject: arguments.append("-GroupByObject") if args.GroupByComment: @@ -1131,32 +1126,32 @@ def main(): if args.NoBind: arguments.append("-NoBind") elif cmd == "add-user": - arguments += ["-User", arg_value(args.NewUser)] + arguments += ["-User", '"%s"' % args.NewUser] if args.NewUserPassword: - arguments += ["-Pwd", arg_value(args.NewUserPassword)] + arguments += ["-Pwd", '"%s"' % args.NewUserPassword] arguments += ["-Rights", args.Rights] if args.RestoreDeletedUser: arguments.append("-RestoreDeletedUser") elif cmd == "copy-users": - arguments += ["-Path", arg_value(args.SourcePath)] - arguments += ["-User", arg_value(args.SourceUser)] + arguments += ["-Path", '"%s"' % args.SourcePath] + arguments += ["-User", '"%s"' % args.SourceUser] if args.SourcePassword: - arguments += ["-Pwd", arg_value(args.SourcePassword)] + arguments += ["-Pwd", '"%s"' % args.SourcePassword] if args.RestoreDeletedUser: arguments.append("-RestoreDeletedUser") elif cmd == "set-label": if args.Version: arguments += ["-v", args.Version] - arguments += ["-name", arg_value(args.Label)] + arguments += ["-name", '"%s"' % args.Label] if args.Comment: for line in args.Comment.splitlines(): - arguments += ["-comment", arg_value(line)] + arguments += ["-comment", '"%s"' % line] if args.Extension: - arguments += ["-Extension", arg_value(args.Extension)] + arguments += ["-Extension", '"%s"' % args.Extension] log_file = os.path.join(temp_dir, "repo_log.txt") - arguments += ["/Out", arg_value(log_file)] + arguments += ["/Out", '"%s"' % log_file] arguments.append("/DisableStartupDialogs") arguments.append("/DisableStartupMessages") arguments += extra_args diff --git a/.claude/skills/db-update/scripts/db-update.py b/.claude/skills/db-update/scripts/db-update.py index 0d95d7093..d3ab13c5b 100644 --- a/.claude/skills/db-update/scripts/db-update.py +++ b/.claude/skills/db-update/scripts/db-update.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# db-update v1.17 — Update 1C database configuration +# db-update v1.18 — Update 1C database configuration # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -404,11 +404,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/epf-build/scripts/epf-build.py b/.claude/skills/epf-build/scripts/epf-build.py index 5a5cb36c7..7dd5423e8 100644 --- a/.claude/skills/epf-build/scripts/epf-build.py +++ b/.claude/skills/epf-build/scripts/epf-build.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# epf-build v1.14 — Build external data processor or report (EPF/ERF) from XML sources +# epf-build v1.15 — Build external data processor or report (EPF/ERF) from XML sources # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr) diff --git a/.claude/skills/epf-dump/scripts/epf-dump.py b/.claude/skills/epf-dump/scripts/epf-dump.py index 91b8edd90..2b13e38b8 100644 --- a/.claude/skills/epf-dump/scripts/epf-dump.py +++ b/.claude/skills/epf-dump/scripts/epf-dump.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# epf-dump v1.13 — Dump external data processor or report (EPF/ERF) to XML sources +# epf-dump v1.14 — Dump external data processor or report (EPF/ERF) to XML sources # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -319,11 +319,20 @@ def run_v8(v8path, arguments): The arguments carry their own quotes inside the value (File="C:\\a b") — that is where 1C's parser expects them, on Windows and on *nix alike. Windows list2cmdline would escape those quotes, so there the command line is handed over ready-made. + + На POSIX аргументы уходят СПИСКОМ, и кавычки, нужные для склейки на Windows, стали бы + частью значения: путь с пробелом платформа не находит («Неопределена информационная + база»), многословный -comment теряет молча. Поэтому здесь снимается ОДИН слой + обрамляющих кавычек. Склеенные ключи (/N"user", /ConfigurationRepositoryF"путь", + File="…") не задеты: у них кавычки внутри токена, а не по краям. """ if os.name == "nt": cmd = '"' + v8path + '" ' + " ".join(arguments) else: - cmd = [v8path] + arguments + cmd = [v8path] + [ + a[1:-1] if len(a) > 1 and a[0] == '"' and a[-1] == '"' else a + for a in arguments + ] r = subprocess.run(cmd, input=b"", capture_output=True) r.stdout = decode_platform_bytes(r.stdout) r.stderr = decode_platform_bytes(r.stderr)