Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/readme/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ yay -S stably-orca-bin
데스크톱 앱과 페어링해 휴대폰에서 에이전트를 모니터링하고 조종하세요.

- **iOS:** [App Store에서 다운로드](https://apps.apple.com/us/app/orca-ide/id6766130217) 또는 [TestFlight 참여](https://testflight.apple.com/join/YjeGMQBA)
- **Android:** [APK 0.0.43 다운로드](https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.43/app-release.apk)
- **Android:** [APK 0.0.43 다운로드](https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.43/app-release.apk) · [설치 가이드](https://www.onorca.dev/docs/android-apk)

---

Expand Down
27 changes: 21 additions & 6 deletions src/main/git/worktree-shared-directories.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { execFileSync } from 'node:child_process'
import { lstatSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
import { devNull, tmpdir } from 'node:os'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import {
clearConfiguredWorktreeSharedDirectoriesCacheForTests,
getConfiguredWorktreeSharedDirectories,
Expand All @@ -16,14 +16,25 @@ import {
import { assertWorktreeCleanForRemoval } from './worktree'
import { getStatus } from './status'

// Isolate git config with real empty files. os.devNull resolves to a
// Windows device path Git rejects as a config path ("fatal: unable to
// access '//./nul': Invalid argument") — every git call in this file
// failed on Windows while CI's Linux/macOS runners accepted /dev/null
// and stayed green (#15409).
const configDir = mkdtempSync(join(tmpdir(), 'orca-git-config-'))
const emptyGlobalConfig = join(configDir, 'global.gitconfig')
const emptySystemConfig = join(configDir, 'system.gitconfig')
writeFileSync(emptyGlobalConfig, '')
writeFileSync(emptySystemConfig, '')

const git = (args: string[], cwd: string): void => {
execFileSync('git', args, {
cwd,
stdio: 'ignore',
env: {
...process.env,
GIT_CONFIG_GLOBAL: devNull,
GIT_CONFIG_SYSTEM: devNull
GIT_CONFIG_GLOBAL: emptyGlobalConfig,
GIT_CONFIG_SYSTEM: emptySystemConfig
}
})
}
Expand All @@ -50,8 +61,12 @@ describe('resolveWorktreeSharedDirectories', () => {
})

afterEach(() => {
warn.mockRestore()
rmSync(repo, { recursive: true, force: true })
warn?.mockRestore?.()
if (repo) rmSync(repo, { recursive: true, force: true })
})

afterAll(() => {
rmSync(configDir, { recursive: true, force: true })
})

it('returns gitignored directories listed under worktree.sharedDirectories', async () => {
Expand Down
Loading