fix(core): save external permissions at project root
This commit is contained in:
parent
5710064ae1
commit
ae49b21376
3 changed files with 53 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ import path from "path"
|
|||
import { Context, Effect, Layer, Schema } from "effect"
|
||||
import { FSUtil } from "./fs-util"
|
||||
import { Location } from "./location"
|
||||
import { Project } from "./project"
|
||||
import { AbsolutePath } from "./schema"
|
||||
|
||||
export const Kind = Schema.Literals(["file", "directory"])
|
||||
export type Kind = typeof Kind.Type
|
||||
|
|
@ -143,7 +145,12 @@ export const layer = Layer.effect(
|
|||
action: "external_directory",
|
||||
directory: externalDirectory,
|
||||
resource: externalResource,
|
||||
save: externalResource,
|
||||
save: slash(
|
||||
path.join(
|
||||
(yield* Project.root(fs, AbsolutePath.make(externalDirectory))) ?? externalDirectory,
|
||||
"*",
|
||||
),
|
||||
),
|
||||
}
|
||||
: undefined,
|
||||
} satisfies Target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue