This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
Conversation
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
@@ -259,11 +305,28 @@ func listFiles(srcPath string, includes, excludes []string) ([]*uploadFile, erro | |||
return nil, err | |||
} | |||
|
|||
// XXX How should we get this guy here? | |||
urlCache = b.urlCache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ybogdanov @romank87 any ideas, how should we bring this guy here?
* make urlFetch a member of Build * adapt to naming change; pass it down to listFiles through makeTarStream as an optional parameter * adapt tests to new makeTarStream and listFiles signatures
@ybogdanov @romank87 PTAL |
return false | ||
} | ||
|
||
var httpClient *http.Client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move the fallback to the default http client to the NewURLFetcherFS
constructor.
* add Grammarly copyrights * uncomment cleanup defers * remove unnecessary comments * move httpClient initialization to constructor * use golang-style ifs more often * use Header.Get to retrieve response etag * use os.IsNotExist to detect non-existent file errors * add test for not-existent file * fail in listFiles if the command is COPY and url is present * adapt copy_test to new listFiles signature
Closed
@@ -309,6 +309,10 @@ func listFiles(srcPath string, includes, excludes []string, urlFetcher URLFetche | |||
for _, pattern := range includes { | |||
|
|||
if isURL(pattern) { | |||
if cmdName == "COPY" { | |||
return nil, fmt.Errorf("can't list downloaded url in COPY command: '%s'", pattern) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use url in COPY command
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.