-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4583 from leandrosansilva/refactoring/do_not_use_…
…deprecated_local_dirs_in_tests Refactoring: Remove usage of deprecated LocalDirs field in SolveOpts
- Loading branch information
Showing
22 changed files
with
351 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
package build | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
"github.com/tonistiigi/fsutil" | ||
) | ||
|
||
// ParseLocal parses --local | ||
func ParseLocal(locals []string) (map[string]string, error) { | ||
return attrMap(locals) | ||
func ParseLocal(locals []string) (map[string]fsutil.FS, error) { | ||
localDirs, err := attrMap(locals) | ||
if err != nil { | ||
return nil, errors.WithStack(err) | ||
} | ||
|
||
mounts := make(map[string]fsutil.FS, len(localDirs)) | ||
|
||
for k, v := range localDirs { | ||
mounts[k], err = fsutil.NewFS(v) | ||
if err != nil { | ||
return nil, errors.WithStack(err) | ||
} | ||
} | ||
|
||
return mounts, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.