fix bmad setup: create staging dirs without mode so _bmad is readable on Windows
mkdir(mode=0o700) yields an owner-only ACL on Windows with Python 3.13+, leaving _bmad unreadable after the rename. Use the default mode instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sk72AxLwQnYttF6VFSxQLt
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
5e747654b9
commit
97b2a95062
@@ -552,7 +552,7 @@ def _publish(destination: Path, outputs: dict[str, bytes], manifest: dict[str, A
|
|||||||
# for a name collision and tries the next name, some two billion times. The render
|
# for a name collision and tries the next name, some two billion times. The render
|
||||||
# would hang in a folder it cannot write to instead of halting.
|
# would hang in a folder it cannot write to instead of halting.
|
||||||
staging = destination.parent / f".staging-{os.urandom(8).hex()}"
|
staging = destination.parent / f".staging-{os.urandom(8).hex()}"
|
||||||
staging.mkdir(mode=0o700)
|
staging.mkdir()
|
||||||
try:
|
try:
|
||||||
for name, content in outputs.items():
|
for name, content in outputs.items():
|
||||||
path = staging / name
|
path = staging / name
|
||||||
|
|||||||
@@ -2238,7 +2238,7 @@ def materialize_bmad(
|
|||||||
# for a name collision and tries the next name, some two billion times. Setup
|
# for a name collision and tries the next name, some two billion times. Setup
|
||||||
# would hang in a folder it cannot write to instead of reporting the failure.
|
# would hang in a folder it cannot write to instead of reporting the failure.
|
||||||
staging = project_root / f"_bmad.setup-{os.urandom(8).hex()}"
|
staging = project_root / f"_bmad.setup-{os.urandom(8).hex()}"
|
||||||
staging.mkdir(mode=0o700)
|
staging.mkdir()
|
||||||
try:
|
try:
|
||||||
# Seed staging so custom/, extra *.user.toml, and leftovers
|
# Seed staging so custom/, extra *.user.toml, and leftovers
|
||||||
# survive replace_dir.
|
# survive replace_dir.
|
||||||
|
|||||||
Reference in New Issue
Block a user