Skip to content

Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode' #49887

Description

@bluelovers

Description

ERROR (#1): Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode'

git-bash windows 11

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ dotenv --override -- opencode2
[11:13:53.701] ERROR (#1): Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode'

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ tsx temp.ts
true
undefined

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ dotenv --override -- tsx temp.ts
true
undefined

.env

NODE_TLS_REJECT_UNAUTHORIZED=0
TMPDIR=T:/
TEMP=T:/
TMP=T:/
NEXT_CACHE_DIR=T:/tmp-next

temp.ts

import fs from "fs"

console.log(fs.lstatSync("T:\\opencode").isDirectory())

console.log(fs.mkdirSync("T:\\opencode", { recursive: true }))
call pnpm add -g opencode-ai
call pnpm add -g --allow-build=@opencode-ai/cli @opencode-ai/cli

in v1 opencode will work
in v2 opencode2 will throw error

T:/ is a ram disk

packages/core/src/global.ts

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

win11

Terminal

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions