client: take localdirs as argument
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -198,7 +198,7 @@ var computeCmd = &cobra.Command{
|
||||
lg.Fatal().Msg("unable to create environment")
|
||||
}
|
||||
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check that all inputs are set
|
||||
checkInputs(ctx, env)
|
||||
|
||||
|
@@ -83,7 +83,7 @@ var editCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check for cue errors by scanning all the inputs
|
||||
_, err := env.ScanInputs(ctx, true)
|
||||
if err != nil {
|
||||
|
@@ -47,7 +47,7 @@ var listCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
inputs, err := env.ScanInputs(ctx, false)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@@ -59,7 +59,7 @@ func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target stri
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
// the inputs are set, check for cue errors by scanning all the inputs
|
||||
_, err := env.ScanInputs(ctx, true)
|
||||
if err != nil {
|
||||
|
@@ -46,7 +46,7 @@ var listCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
return ListOutputs(ctx, env, true)
|
||||
})
|
||||
|
||||
|
@@ -89,8 +89,7 @@ func Execute() {
|
||||
)
|
||||
|
||||
if len(os.Args) > 1 {
|
||||
tr := otel.Tracer("cmd")
|
||||
ctx, span = tr.Start(ctx, os.Args[1])
|
||||
ctx, span = otel.Tracer("dagger").Start(ctx, os.Args[1])
|
||||
// Record the action
|
||||
span.AddEvent("command", trace.WithAttributes(
|
||||
attribute.String("args", strings.Join(os.Args, " ")),
|
||||
|
@@ -66,7 +66,7 @@ var upCmd = &cobra.Command{
|
||||
lg.Fatal().Msg("unable to create environment")
|
||||
}
|
||||
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check that all inputs are set
|
||||
if err := checkInputs(ctx, env); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user