Skip to content

Bug: Symlink resolution fails on Windows, ensure_state_dir not found #5

@wbw20000

Description

@wbw20000

Description

On Windows (Git Bash / MINGW64), running bashclaw gateway fails with:

ensure_state_dir: command not found

Root Cause

The install script creates a file copy at ~/.local/bin/bashclaw instead of a symlink. The _bashclaw_resolve_root() function in the entry script checks for symlinks (-L), but since the file is a copy, BASHCLAW_ROOT resolves to ~/.local/bin/ instead of ~/.bashclaw/bin/. This means none of the lib/*.sh modules get sourced.

Steps to Reproduce

  1. Install BashClaw on Windows via the install script
  2. Run bashclaw gateway from Git Bash
  3. Observe the ensure_state_dir: command not found error

Fix

Replace the copy at ~/.local/bin/bashclaw with a wrapper script:

#!/usr/bin/env bash
exec bash "$HOME/.bashclaw/bin/bashclaw" "$@"

Or fix the install script to create a proper symlink, or resolve the path differently when symlinks aren't available.

Environment

  • OS: Windows 11 (Git Bash / MINGW64)
  • Bash: 5.2.37
  • BashClaw: 1.0.0

Fix: wbw20000@fb2fc38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions