chore: add release binaries v1.6.x, v1.8.9-v1.8.23 and fix MSYS path conversion

- Add 17 release executables that were missing from the remote repo
- Fix MSYS path conversion issue in tools/ssh.py for Windows compatibility
- Add nul to .gitignore to prevent Windows special file conflicts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-24 07:08:40 -05:00
parent 8554c73ba0
commit d7101a12d2
19 changed files with 36 additions and 12 deletions

1
.gitignore vendored
View File

@@ -17,3 +17,4 @@ build/
.vscode/
.idea/
*.swp
nul

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# Disable MSYS path conversion to prevent Windows path conversion issues
os.environ['MSYS_NO_PATHCONV'] = '1'
"""
SSH utility for Claude Code — connects to servers by alias.
Credentials stored locally in servers.json (encrypted), NEVER exposed to AI API.
@@ -163,31 +165,52 @@ def _shell_quote(s: str) -> str:
# ── File transfer ─────────────────────────────────────
def _normalize_remote_path(remote_path: str) -> str:
"""Normalize remote path by detecting and fixing MSYS path conversions."""
# If the path looks like a Windows path that was converted by MSYS, fix it back
if ':' in remote_path and ('Program Files/Git' in remote_path or len(remote_path) > 1 and remote_path[1] == ':'):
# Convert C:/Program Files/Git/tmp/file.txt back to /tmp/file.txt
# Find the position where Git path starts
if 'Program Files/Git' in remote_path:
git_pos = remote_path.find('Program Files/Git')
if git_pos != -1:
# Extract the part after Program Files/Git
actual_path = remote_path[git_pos + len('Program Files/Git'):]
return actual_path
# If it's just a drive letter followed by :, convert it too
if len(remote_path) > 3 and remote_path[1] == ':' and remote_path[2] == '/':
# This is a Windows-style path like C:/something
# Try to determine if it's supposed to be a Unix path
potential_unix_path = remote_path[3:] # Remove drive prefix like "C:"
# If the resulting path starts with a common Unix directory, assume it should be Unix path
if (potential_unix_path.startswith('/tmp/') or potential_unix_path.startswith('/home/') or potential_unix_path.startswith('/etc/') or potential_unix_path.startswith('/var/') or potential_unix_path.startswith('/usr/')):
return potential_unix_path
return remote_path
def upload_file(server: dict, local_path: str, remote_path: str):
# Normalize the remote path to handle MSYS conversion issues
normalized_remote_path = _normalize_remote_path(remote_path)
client = get_client(server)
try:
sftp = client.open_sftp()
sftp.put(local_path, remote_path)
sftp.chmod(remote_path, 0o664)
sftp.put(local_path, normalized_remote_path)
sftp.chmod(normalized_remote_path, 0o664)
sftp.close()
print(f"OK: {local_path} -> {server['alias']}:{remote_path}")
print(f"OK: {local_path} -> {server['alias']}:{normalized_remote_path}")
finally:
client.close()
def download_file(server: dict, remote_path: str, local_path: str):
# Normalize the remote path to handle MSYS conversion issues
normalized_remote_path = _normalize_remote_path(remote_path)
client = get_client(server)
try:
sftp = client.open_sftp()
sftp.get(remote_path, local_path)
sftp.get(normalized_remote_path, local_path)
sftp.close()
print(f"OK: {server['alias']}:{remote_path} -> {local_path}")
print(f"OK: {server['alias']}:{normalized_remote_path} -> {local_path}")
finally:
client.close()
# ── Key management ────────────────────────────────────
def install_key(server: dict):
pub_key_path = SSH_KEY_PATH + ".pub"
if not os.path.exists(pub_key_path):
@@ -459,4 +482,4 @@ if __name__ == "__main__":
raise
except Exception as e:
print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
sys.exit(1)
sys.exit(1)