yarnpkg/yarn

Bad file paths when publishing on Windows (backslash in package file paths)

Open

#3,031 创建于 2017年4月2日

在 GitHub 查看
 (1 评论) (2 反应) (0 负责人)JavaScript (41,514 star) (2,731 fork)batch import
cat-buggood first issueneeds-confirmationos-windowstriaged

描述

Do you want to request a feature or report a bug? bug

What is the current behavior? Packages published via yarn publish, on Windows, seem to use backslash as a path separator for file paths. This becomes a problem when these packages are added on *nix systems where the backslash is interpreted as part of the filename and not as a directory separator.

So if a package is published, on Windows, with the following file path: dist/test.min.js When added, on a *nix system, the file is downloaded and created as: dist\test.min.js

If the current behavior is a bug, please provide the steps to reproduce.

  1. Publish a package on a Windows system (yarn publish blah)
  2. Add that package as dependency to a project via yarn add blah on a *nix system

What is the expected behavior? Directory structure of published folder from a Windows system will be retained when adding package on *nix system.

Please mention your node.js, yarn and operating system version. System used to publish:

  • node v6.9.1
  • yarn v0.21.3
  • Windows 10 Home v1607 (64-bit)

System used to add:

  • node v7.8.0
  • yarn v0.21.3
  • Ubuntu 14.04

贡献者指南

Bad file paths when publishing on Windows (backslash in package file paths) · yarnpkg/yarn#3031 | Good First Issue