Skip to content
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: Replace writeFile with ioutil.WriteFile #42

Merged

Commits on Jul 9, 2018

  1. installer/pkg: Replace writeFile with ioutil.WriteFile

    The writeFile helpers are from 2b82fbe (installer: Integrate
    multistep cli with configuration, 2018-02-16,
    coreos/tectonic-installer#2960) and 461ff5f (cli: add support for
    user ignition files, 2018-03-23, coreos/tectonic-installer#3120).  But
    ioutil's function has almost the same signature.  Remove our local
    versions and use the stdlib's instead.
    
    The \n addition is because ioutil.WriteFile does not append newlines
    (which workflow.writeFile did via Fprintln).
    
    I've used os.Create's 0666 [1] in most cases; callers can set a umask
    if they want to restrict that.  The exception is in
    generatePrivateKey, where I've set 0600 to avoid leaking a private key
    even in the presence of a weak umask.
    
    [1]: https://golang.org/pkg/os/#Create
    wking committed Jul 9, 2018
    Configuration menu
    Copy the full SHA
    9912b19 View commit details
    Browse the repository at this point in the history