mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 21:11:08 +02:00
When 788f328dc752a75da08d4c6fc27d094ecb4807d5 introduced pulling from docker by default, "--insecure-options=image" was added for all docker registries. However, when the user also needs to set "http" as in "--insecure-options=image,http" it will not be used because the other argument is added as last disregarding the option was already set by the user. Check if the option was set by the user and only add it if it is not provided. If the user forgets to add "image" then rkt will simply fail and tell that this option is needed; thus no complex logic of appending and detecting only "image" is needed. Do the same for the "--trust-keys-from-https" option to be consistent in allowing to overwrite it with "--trust-keys-from-https=false".