fix: replace HOME env variable with os.homedir() to support windows

This commit is contained in:
simosmik
2025-12-30 18:07:04 +00:00
parent 04821b8ad5
commit b315360f8a
3 changed files with 13 additions and 12 deletions

View File

@@ -84,7 +84,7 @@ const connectedClients = new Set();
// Setup file system watcher for Claude projects folder using chokidar
async function setupProjectsWatcher() {
const chokidar = (await import('chokidar')).default;
const claudeProjectsPath = path.join(process.env.HOME, '.claude', 'projects');
const claudeProjectsPath = path.join(os.homedir(), '.claude', 'projects');
if (projectsWatcher) {
projectsWatcher.close();
@@ -1015,7 +1015,7 @@ function handleShellConnection(ws) {
name: 'xterm-256color',
cols: termCols,
rows: termRows,
cwd: process.env.HOME || (os.platform() === 'win32' ? process.env.USERPROFILE : '/'),
cwd: os.homedir(),
env: {
...process.env,
TERM: 'xterm-256color',