Skip to content

Commit

Permalink
add a message if usenix is false but some dependencies exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zuzuleinen committed Apr 20, 2022
1 parent 052594c commit a393d6c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bob/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/benchkram/bob/bob/bobfile"
"github.com/benchkram/bob/bob/playbook"
"github.com/benchkram/errz"
"os"
Expand All @@ -23,8 +24,16 @@ func (b *B) Build(ctx context.Context, taskName string) (err error) {

b.PrintVersionCompatibility(ag)

workingDirectoryBobFile, err := bobfile.BobfileRead(ag.Dir())
errz.Fatal(err)

var storePaths []string
ag.Dependencies = append(ag.BTasks[taskName].Dependencies, ag.Dependencies...)
ag.Dependencies = append(ag.BTasks[taskName].Dependencies, workingDirectoryBobFile.Dependencies...)

if len(ag.Dependencies) > 0 && !ag.UseNix {
fmt.Println("Found a list of dependencies, but use-nix is false")
}

if ag.UseNix && len(ag.Dependencies) > 0 {
_, err = exec.LookPath("nix-build")
errz.Fatal(err)
Expand Down

0 comments on commit a393d6c

Please sign in to comment.