This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Andrea Luzzardi 5e950b6fe9 stdlib: expose dagger.#Source
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2022-01-20 16:50:53 -08:00

33 lines
523 B
CUE

package dagger
import (
"dagger.io/dagger/engine"
)
// Access the source directory for the current CUE package
// This may safely be called from any package
#Source: engine.#Source
// Select a subdirectory from a filesystem tree
#Subdir: {
// Input tree
input: #FS
// Path of the subdirectory
// Example: "/build"
path: string
// Copy action
_copy: engine.#Copy & {
"input": engine.#Scratch
source: {
root: input
"path": path
}
dest: "/"
}
// Subdirectory tree
output: #FS & _copy.output
}