Refactor how client prepares environment. Inputs may now reference local directories
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
@@ -29,7 +29,7 @@ var computeCmd = &cobra.Command{
|
||||
|
||||
c, err := dagger.NewClient(ctx, dagger.ClientConfig{
|
||||
Input: viper.GetString("input"),
|
||||
BootDir: args[0],
|
||||
Updater: localUpdater(args[0]),
|
||||
})
|
||||
if err != nil {
|
||||
lg.Fatal().Err(err).Msg("unable to create client")
|
||||
@@ -46,6 +46,16 @@ var computeCmd = &cobra.Command{
|
||||
},
|
||||
}
|
||||
|
||||
func localUpdater(dir string) string {
|
||||
return fmt.Sprintf(`[
|
||||
{
|
||||
do: "local"
|
||||
dir: "%s"
|
||||
include: ["*.cue", "cue.mod"]
|
||||
}
|
||||
]`, dir)
|
||||
}
|
||||
|
||||
func init() {
|
||||
computeCmd.Flags().String("input", "", "Input overlay")
|
||||
|
||||
|
Reference in New Issue
Block a user