migrate: move flock and hash utilities to shared package (#22640)
This commit is contained in:
@@ -3,6 +3,7 @@ import { xdgData, xdgCache, xdgConfig, xdgState } from "xdg-basedir"
|
||||
import path from "path"
|
||||
import os from "os"
|
||||
import { Filesystem } from "../util/filesystem"
|
||||
import { Flock } from "@opencode-ai/shared/util/flock"
|
||||
|
||||
const app = "opencode"
|
||||
|
||||
@@ -26,6 +27,9 @@ export namespace Global {
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize Flock with global state path
|
||||
Flock.setGlobal({ state })
|
||||
|
||||
await Promise.all([
|
||||
fs.mkdir(Global.Path.data, { recursive: true }),
|
||||
fs.mkdir(Global.Path.config, { recursive: true }),
|
||||
|
||||
Reference in New Issue
Block a user