Automattic / a8c-ci-toolkit-buildkite-plugin

A caching plugin that can be invoked from your build script.
21 stars 5 forks source link

Correctly parse SSH key from single-line env var in `add_ssh_key_to_agent` #24

Closed mokagio closed 2 years ago

mokagio commented 2 years ago

Fixes #20. The trick was to call echo -e instead of echo.

Without the -e flag, the \n in the single-line string where the SSH key stored were printed literally in the SSH key file, making it an invalid key.

You can see this in action in 3927-gh-shiftyjelly/pocketcasts-ios.