Skip to content

Windows line endings issue #392

@aolmosj

Description

@aolmosj

I'm running tfenv inside an ubuntu docker container, and I'm using .terraform-version files in multiple folders to set the terraform version. When running this container in linux or macos, it's working all right so terraform version is set properly. The problem is when some of my team mates run this container in Windows hosts.

The .terraform-version files have the windows line endings, and when invoking terraform, I get this error:

# terraform --version

' is not installed (set by /repo/config/.terraform-version). Installing now as TFENV_AUTO_INSTALL==true
' found in remoteing '1.3.5

Then they need to run echo "1.3.5" > /repo/config/.terraform-version inside the ubuntu container to overwrite the windows line endings by linux line endings.

I suspect that it is git for windows the responsible for transforming the linux line endings stored in the git repo, for windows line endings when checking out. Anyways... tfenv should be able to work properly with both line endings formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions