Add repodir variable

This commit is contained in:
Elara 2022-11-13 19:08:58 -08:00
parent 07e41849e9
commit 7442da7105
1 changed files with 2 additions and 2 deletions

View File

@ -505,8 +505,8 @@ func getSources(ctx context.Context, srcdir string, bv *BuildVars) error {
// setDirVars sets srcdir and pkgdir. It's a very hacky way of doing so,
// but setting the runner's Env and Vars fields doesn't seem to work.
func setDirVars(ctx context.Context, runner *interp.Runner, srcdir, pkgdir string) error {
cmd := "srcdir='" + srcdir + "'\npkgdir='" + pkgdir + "'\n"
func setDirVars(ctx context.Context, runner *interp.Runner, srcdir, pkgdir, repodir string) error {
cmd := "srcdir='" + srcdir + "'\npkgdir='" + pkgdir + "'\nrepodir='" + repodir + "'\n"
fl, err := syntax.NewParser().Parse(strings.NewReader(cmd), "vars")
if err != nil {
return err