Skip to content

Commit 62822cf

Browse files
authored
Merge pull request #6 from kcrommett/copilot/sub-pr-5
Fix fs.constants import in global config permission check
2 parents 3ac19ec + 7d10a9b commit 62822cf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/sh
2+
export PATH="$HOME/.bun/bin:$PATH"
23
bun typecheck

packages/opencode/src/config/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ModelsDev } from "../provider/models"
77
import { mergeDeep, pipe } from "remeda"
88
import { Global } from "../global"
99
import fs from "fs/promises"
10+
import { constants } from "fs"
1011
import { lazy } from "../util/lazy"
1112
import { NamedError } from "../util/error"
1213
import { Flag } from "../flag/flag"
@@ -896,7 +897,7 @@ export namespace Config {
896897

897898
// Check write permissions
898899
try {
899-
await fs.access(Global.Path.config, fs.constants.W_OK)
900+
await fs.access(Global.Path.config, constants.W_OK)
900901
} catch (err) {
901902
throw new UpdateError(
902903
{

0 commit comments

Comments
 (0)