Skip to content

Commit a288741

Browse files
rustyconoverclaude
andcommitted
attach secret options: platform guard mypy understands on Windows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ea7abd4 commit a288741

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎vgi/attach_secret_options.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import getpass
3737
import os
3838
import stat
39+
import sys
3940
import tempfile
4041
import threading
4142
from pathlib import Path
@@ -147,7 +148,7 @@ def _key_file_error(path: Path, problem: str) -> AttachSecretKeyError:
147148

148149

149150
def _check_private(path: Path, st: os.stat_result, what: str) -> None:
150-
if os.name != "posix":
151+
if sys.platform == "win32": # best effort: the per-user profile temp directory
151152
return
152153
if st.st_uid != os.getuid():
153154
raise _key_file_error(path, f"the {what} is not owned by the current user")

0 commit comments

Comments
 (0)