Skip to content

use of path.join causes test failures on Windows #226

Closed
@jeffmcaffer

Description

What is the current behavior?

there are several places in the code where path.join is used in the creation of a URL. Unfortunately, on windows the path separator is ``` and that produces invalid URLs. While we may not intend the service to actually run on Windows, community members seeking to contribute and working on Windows will want to run the tests which expect valid URLs.

See the following for specific examples. There may well be more.

Unfortunately there are lots of legit uses of path.join so a simple search for that pattern is pretty noisy. I don't have a good enough handle on the codebase to easily identify which parts are likely to construct URLs.

Would be super interesting to have a CodeQL query that detects the use of path.join to create value that's eventually returned in a header or some such.

What changes are you suggesting?

cc: @github/docs-engineering

Metadata

Assignees

No one assigned

    Labels

    bugAn error or flaw that causes unintended or unexpected resultsengineeringWill involve Docs EngineeringtriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions