mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-06 19:50:20 +03:00
fix(db-create): PY — убрать встроенные кавычки в строке соединения 1cv8
subprocess.run([exe]+args) на Windows сам экранирует кавычки внутри одного
аргумента, поэтому f'File="{path}"' / f'Srvr="..";Ref=".."' приходили в 1С
покорёженными → CREATEINFOBASE падал «Неверные параметры соединения» (exit 1).
Без встроенных кавычек subprocess сам квотит токен с пробелами, а argv-парсер 1С
снимает внешние кавычки. Предсуществующий баг (на dev), всплыл на --runtime python
движковой матрицы. PS-порт корректен (зелёный прогон) — в нём только бамп версии
для синхронности портов. v1.3 → v1.4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
55e7d82210
commit
32bf72bba9
@@ -1,4 +1,4 @@
|
|||||||
# db-create v1.3 — Create 1C information base
|
# db-create v1.4 — Create 1C information base
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# db-create v1.3 — Create 1C information base
|
# db-create v1.4 — Create 1C information base
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
@@ -131,9 +131,11 @@ def main():
|
|||||||
arguments = ["CREATEINFOBASE"]
|
arguments = ["CREATEINFOBASE"]
|
||||||
|
|
||||||
if args.InfoBaseServer and args.InfoBaseRef:
|
if args.InfoBaseServer and args.InfoBaseRef:
|
||||||
arguments.append(f'Srvr="{args.InfoBaseServer}";Ref="{args.InfoBaseRef}"')
|
# No embedded quotes: subprocess quotes the whole token; 1C's argv parser
|
||||||
|
# strips outer quotes. Inner quotes get escaped by list2cmdline and break parsing.
|
||||||
|
arguments.append(f'Srvr={args.InfoBaseServer};Ref={args.InfoBaseRef}')
|
||||||
else:
|
else:
|
||||||
arguments.append(f'File="{args.InfoBasePath}"')
|
arguments.append(f'File={args.InfoBasePath}')
|
||||||
|
|
||||||
# --- Template ---
|
# --- Template ---
|
||||||
if args.UseTemplate:
|
if args.UseTemplate:
|
||||||
|
|||||||
Reference in New Issue
Block a user