skybet / cali

Cali Automation Layout Initialiser
MIT License
32 stars 7 forks source link

Remove auto-mount of aws credentials #48

Closed nwillems closed 6 years ago

nwillems commented 6 years ago

This solves half of #7

The reason for me implementing this, is that the current ~ expansion logic is hard to make work in a cross-compilation setup, eg when compiling the binary and putting in a Dockerfile with FROM scratch. This is due to the use of user.Current().

I have run the tests, dunno if there should be a new one?

I can produce a minimal example where it "breaks", if anyone is interested? :-)

Have a nice day.

wheresalice commented 6 years ago

Happy for this to be merged in, there won't be many places where people expect ~/.aws to be mounted and all the CI tests have passed - we just need to make it clear in the changelog for the next release.

I am curious to see an example of where this is breaking if that's easy for you to do. Mostly so we better understand how to avoid breaking something similar with future changes. For example in git.go we are using os.Getenv("HOME") to get the home directory. Would this be a better solution than the current user.Current().HomeDir or are those two functionally equivalent?

lucymhdavies commented 6 years ago

Released in https://github.com/skybet/cali/releases/tag/v0.3.0

nwillems commented 6 years ago

Example https://gist.github.com/nwillems/500d819155422e68c7aa115e9521eb26 :-)