Honor copy=true in directory mode for local file copies#327
Honor copy=true in directory mode for local file copies#327ebudan wants to merge 29 commits intohashicorp:mainfrom
Conversation
sylviamoss
left a comment
There was a problem hiding this comment.
This is looking good 👍🏼
I miss a test though. A test similar to: https://github.com/hashicorp/go-getter/blob/main/get_file_test.go#L129
…request (hashicorp#321) * Add test to verify canceled context.Context aborts http request * http: Initialize http.Request with ctx so cancelation interrupts the request
9e42df5 introduced an `Insecure` flag for the http getter and in its error reporting relied on the `url.Redacted()` method introduced in golang 1.15 (See https://golang.org/doc/go1.15). This breaks CI, but golang 1.14 is out of support so our minimum supported version of go should now be on the 1.15.x series.
|
Added test as requested, and reverted my dir creation change - the reason for that was obscure and not useful here. Module name was changed as I had to use my fork - reverted, will need an additional fork unless this request works for you. Two realizations during this commit: this leaves the Windows version uncovered (no opportunity here), and there is no support in the CLI tool for hard copy. What would be preferrable for the latter: a command line option (that only applies to copy... ouch), or a url parameter (go-getter file:///tmp/foo?copy=true /tmp/dst ...ouch)? |
|
Merge this? |
This looks like an oversight: when getting local files, directory copies always result in a symlink. This may not be desirable in all use cases.