Move demandDirectoryRoot into kyaml/filesys (#4677)

* Move demandDirectoryRoot into kyaml/filesys

* Make root directory platform-agnostic

Support windows root directory. Dogfood own error package.

* Use cleaner windows support implementation

* Address feedback

* Address feedback x2

* Re-apply go.sum changes to avoid CI errors
This commit is contained in:
Anna Song
2022-06-30 14:12:07 -04:00
committed by GitHub
parent 7e0fd02783
commit d1102fb726
49 changed files with 368 additions and 145 deletions

View File

@@ -323,7 +323,7 @@ func TestRemoteResourceWithHttpError(t *testing.T) {
_, err := b.Run(fSys, tmpDir.String())
httpErr := fmt.Errorf("%w: status code %d (%s)", loader.ErrorHTTP, 404, http.StatusText(404))
httpErr := fmt.Errorf("%w: status code %d (%s)", loader.ErrHTTP, 404, http.StatusText(404))
accuFromErr := fmt.Errorf("accumulating resources from '%s': %w", url404, httpErr)
expectedErr := fmt.Errorf("accumulating resources: %w", accuFromErr)
req.EqualErrorf(err, expectedErr.Error(), url404)