Compare commits
3 Commits
main
...
fix/window
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
221cdb7f2f | ||
|
|
1d752b1d07 | ||
|
|
1f13d91256 |
22
README.md
22
README.md
@ -81,6 +81,8 @@ When everything looks good:
|
||||
- Open the DMG file and drag Crystal to your Applications folder
|
||||
- On first launch, you may need to right-click and select "Open" due to macOS security settings
|
||||
|
||||
- **Windows**: Windows installer coming soon! For now, see [Building from Source](#building-from-source) below to build locally.
|
||||
|
||||
### Homebrew
|
||||
```bash
|
||||
brew install --cask stravu-crystal
|
||||
@ -102,11 +104,29 @@ pnpm run electron-dev
|
||||
|
||||
## Building for Production
|
||||
|
||||
### macOS
|
||||
```bash
|
||||
# Build for macOS
|
||||
pnpm build:mac
|
||||
```
|
||||
|
||||
### Windows
|
||||
```bash
|
||||
# Prerequisites:
|
||||
# - Node.js and pnpm installed
|
||||
# - Git installed and configured
|
||||
# - Claude Code installed (`npm install -g @anthropic-ai/claude-code`)
|
||||
|
||||
# Clone and setup
|
||||
git clone https://github.com/stravu/crystal.git
|
||||
cd crystal
|
||||
pnpm run setup
|
||||
|
||||
# Build for Windows
|
||||
pnpm build:win
|
||||
```
|
||||
|
||||
The Windows build will create an executable in the `dist-electron` directory. A Windows installer (.exe) will be available in future releases.
|
||||
|
||||
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
@ -93,9 +93,9 @@ export class CommitManager extends EventEmitter {
|
||||
const fullMessage = prefix + commitMessage;
|
||||
|
||||
// For checkpoint mode, use a simple commit without the extra signature
|
||||
// Escape the message properly for the shell
|
||||
const escapedMessage = fullMessage.replace(/'/g, "'\\''");
|
||||
const commitCommand = `git commit -m '${escapedMessage}' --no-verify`;
|
||||
// Use double quotes which work better cross-platform
|
||||
const escapedMessage = fullMessage.replace(/"/g, '\\"');
|
||||
const commitCommand = `git commit -m "${escapedMessage}" --no-verify`;
|
||||
const result = execSync(commitCommand, { cwd: worktreePath, encoding: 'utf8' });
|
||||
|
||||
// Extract commit hash from output
|
||||
|
||||
@ -189,7 +189,7 @@ export async function testClaudeCodeInDirectory(directory: string, customClaudeP
|
||||
const timeout = os.platform() === 'linux' ? 3000 : 10000; // Shorter timeout for Linux
|
||||
|
||||
// Use custom path if provided, otherwise use 'claude' which will be found in PATH
|
||||
const claudeCommand = customClaudePath || 'claude';
|
||||
const claudeCommand = customClaudePath || findExecutableInPath('claude') || 'claude';
|
||||
|
||||
console.log(`[ClaudeTest] Running '${claudeCommand} --help' in ${directory} with timeout ${timeout}ms...`);
|
||||
const { stdout, stderr } = await execAsync(`"${claudeCommand}" --help`, {
|
||||
|
||||
@ -366,8 +366,9 @@ export function findExecutableInPath(executable: string): string | null {
|
||||
console.log(`[ShellPath] Searching in ${paths.length} PATH directories`);
|
||||
|
||||
// On Windows, executables might have .exe, .cmd, or .bat extensions
|
||||
const executableNames = isWindows
|
||||
? [executable, `${executable}.exe`, `${executable}.cmd`, `${executable}.bat`]
|
||||
// Prioritize .cmd and .exe over shell scripts on Windows
|
||||
const executableNames = isWindows
|
||||
? [`${executable}.cmd`, `${executable}.exe`, `${executable}.bat`, executable]
|
||||
: [executable];
|
||||
|
||||
let searchedPaths = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user