Skip to content

Commit 3701b64

Browse files
committed
fix: log full scoped name for skipped jobs
For output consistency with one that are not skipped.
1 parent 4217025 commit 3701b64

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/run/controller/job.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ func (c *Controller) runSingleJob(ctx context.Context, scope *scope, id string,
8585

8686
name := job.PrintableName(id)
8787
scope = scope.extend(job)
88+
logName := strings.Join(append(scope.names, name), " ❯ ")
8889

8990
if reason := c.skipReason(scope, job, name); len(reason) > 0 {
90-
log.Skip(name, reason)
91+
log.Skip(logName, reason)
9192

9293
return result.Skip(name)
9394
}
@@ -117,7 +118,7 @@ func (c *Controller) runSingleJob(ctx context.Context, scope *scope, id string,
117118
ExcludeFiles: scope.excludeFiles,
118119
})
119120
if err != nil {
120-
log.Skip(name, err.Error())
121+
log.Skip(logName, err.Error())
121122

122123
var skipErr command.SkipError
123124
if errors.As(err, &skipErr) {
@@ -129,7 +130,7 @@ func (c *Controller) runSingleJob(ctx context.Context, scope *scope, id string,
129130

130131
env := maps.Clone(scope.env)
131132
maps.Copy(env, job.Env)
132-
ok := c.run(ctx, strings.Join(append(scope.names, name), " ❯ "), scope.follow, exec.Options{
133+
ok := c.run(ctx, logName, scope.follow, exec.Options{
133134
Root: filepath.Join(c.git.RootPath, scope.root),
134135
Commands: commands,
135136
Interactive: job.Interactive && !scope.opts.DisableTTY,

0 commit comments

Comments
 (0)