-
Notifications
You must be signed in to change notification settings - Fork 1.5k
installer/pkg/copy: Factor out Copy into its own package #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installer/pkg/copy: Factor out Copy into its own package #38
Conversation
|
Can one of the admins verify this patch? |
|
Hold off on this one, there's another |
037af30 to
a3976a2
Compare
Ok, I've pushed 037af304 -> 59829963, creating a new |
a3976a2 to
5982996
Compare
|
/ok-to-test |
|
/lgtm |
|
lgtm |
This code is descended from terraformPrepareStep, which landed in 1b4bb62 (Cli tool, 2018-02-05, coreos/tectonic-installer#2806). The workspace version was factored out into copyFile in 2b82fbe (installer: Integrate multistep cli with configuration, 2018-02-16, coreos/tectonic-installer#2960). The config-generator version was copy/pasted (or independently developed?) in 1d54899 (installer/pkg/config-generator/tls: generate root CA's with go, 2018-06-28, coreos/tectonic-installer#3316). This commit DRYs that up by pulling the duplicate code out into a shared package. I've also changed O_RDWR to O_WRONLY. The O_RDWR is originally from 1b4bb62, but we do not require the ability to read from the target file. Also add a unit test to exercise this code.
5982996 to
9abf7a3
Compare
Not sure why this just came in now, it looks like the issues were context conflicts with #42, which landed Friday. Anyway, rebased with onto master with 5982996 -> 9abf7a3. |
|
/lgtm |
The
O_RDWRis originally from 1b4bb62 (coreos/tectonic-installer#2806), but we do not require the ability to read from the target file.Also add a unit test to exercise this code.