Skip to content

Commit 337fda5

Browse files
authored
Log implicit fallback to backendless (#2386)
1 parent d81c3ea commit 337fda5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cli/cmd/digger/default.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ package main
33
import (
44
"encoding/json"
55
"fmt"
6+
"log/slog"
7+
"os"
8+
"runtime/debug"
9+
610
"github.com/diggerhq/digger/cli/pkg/digger"
711
"github.com/diggerhq/digger/cli/pkg/drift"
812
"github.com/diggerhq/digger/cli/pkg/github"
@@ -13,9 +17,6 @@ import (
1317
"github.com/diggerhq/digger/libs/policy"
1418
lib_spec "github.com/diggerhq/digger/libs/spec"
1519
"github.com/spf13/cobra"
16-
"log/slog"
17-
"os"
18-
"runtime/debug"
1920
)
2021

2122
func initLogger() {
@@ -70,6 +71,10 @@ var defaultCmd = &cobra.Command{
7071
usage.ReportErrorAndExit(spec.VCS.Actor, "Successfully ran spec", 0)
7172
}
7273

74+
if specStr == "" {
75+
slog.Warn("No orchestrator spec found (DIGGER_RUN_SPEC is empty); falling back to backendless mode. If this run was triggered by Digger backend, ensure your workflow passes 'with: digger-spec: ${{ inputs.spec }}' so DIGGER_RUN_SPEC is set.")
76+
}
77+
7378
var logLeader = "Unknown CI"
7479
ci := digger.DetectCI()
7580

0 commit comments

Comments
 (0)