-
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.
Updated tests in frontend/dockerfile/dockerfile_test.go to run on Win…
…dows. Partially addressing #4485 Signed-off-by: Billy Owire <[email protected]>
- Loading branch information
Showing
6 changed files
with
119 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build !windows | ||
// +build !windows | ||
|
||
package contenthash | ||
|
||
import "path/filepath" | ||
|
||
func (cc *cacheContext) walk(scanPath string, walkFunc filepath.WalkFunc) error { | ||
return filepath.Walk(scanPath, walkFunc) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package contenthash | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/Microsoft/go-winio" | ||
) | ||
|
||
func (cc *cacheContext) walk(scanPath string, walkFunc filepath.WalkFunc) error { | ||
// elevating the admin privileges to walk special files/directory | ||
// like `System Volume Information`, etc. See similar in #4994 | ||
privileges := []string{winio.SeBackupPrivilege} | ||
return winio.RunWithPrivileges(privileges, func() error { | ||
return filepath.Walk(scanPath, walkFunc) | ||
}) | ||
} |
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