Fix local directory error handling

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-10-19 14:47:52 -07:00
parent 36f468577a
commit c08f619b02
3 changed files with 20 additions and 19 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
@@ -116,13 +115,9 @@ func (c *Client) buildfn(ctx context.Context, st *state.State, env *environment.
lg := log.Ctx(ctx)
// Scan local dirs to grant access
localdirs := env.LocalDirs()
for label, dir := range localdirs {
abs, err := filepath.Abs(dir)
if err != nil {
return err
}
localdirs[label] = abs
localdirs, err := env.LocalDirs()
if err != nil {
return err
}
// buildkit auth provider (registry)