Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
adds RootsOptions to PackOptions (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Jun 3, 2019
1 parent b129dd9 commit 6afa88b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions v2/jam/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type PackOptions struct {
Legacy bool
StoreCmd string
Roots []string
RootsOptions *parser.RootsOptions
}

// Pack the roots given + PWD
Expand All @@ -33,9 +34,15 @@ func Pack(opts PackOptions) error {
return err
}

p, err := parser.NewFromRoots(opts.Roots, &parser.RootsOptions{
IgnoreImports: opts.IgnoreImports,
})
if opts.RootsOptions == nil {
opts.RootsOptions = &parser.RootsOptions{}
}

if opts.IgnoreImports {
opts.RootsOptions.IgnoreImports = true
}

p, err := parser.NewFromRoots(opts.Roots, opts.RootsOptions)
if err != nil {
return err
}
Expand Down

0 comments on commit 6afa88b

Please sign in to comment.