Skip to content

Use shorter working directory path on Windows runners #955

@Piedone

Description

@Piedone

Description

Despite app-specific workarounds like git longpaths, and despite Windows kind of supporting long paths for a while (and this being enabled in the runner image), there are still some apps that'll break in various ways with long (>260 character) paths. Thus, every letter counts, especially since the repository name is also added to the path, twice. My suggestion is to make the working directory's path under Windows as short as possible.

Now, today long paths shouldn't be an issue for any app out of the box, but decades of the path limitation being in place caused the ecosystem to also rely on it.

This is not the same as #923 (since that happens under Linux, apparently).

Expected behavior

The working directory has a path as short as possible, like D:\a.

Actual behavior

The working directory's path includes the repository's name, twice, making it potentially really long.

This is a real pain if you have a repository name like https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions. Here, the working directory will be D:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions (or under the C drive on larger runners). This leaves us with 183 characters to work with, to stay on the safe side of the 260-character limit. After our prior tests, it seems that pretty much the only option is changing the repo name (what we'd like to avoid).

Repro steps

This is not specific to one build or app. Two examples that I've bumped into:

  • Git checkout failing. Can be worked around with git longpaths.
  • SQLite operations failing from under .NET with "SQLite Error 14: 'unable to open database file'".

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