-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Fix slashes on Windows. #2423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix slashes on Windows. #2423
Conversation
Is there anyone with a windows box who can verify? |
Here's the output without this patch (trimmed) to get an idea:
My main concern is that I don't know where this bug comes from. Is it from metalsmith itself? |
There's a bug somewhere which results in backslashes in paths when building on Windows.
@XhmikosR, Have you submitted |
@MaledongGit: what do you mean? If you mean the vnu addition, that's in #2469, which isn't ready yet. |
@XhmikosR :Well……I fetched the latest version of codes and I cannot use |
If you mean the slashes PR, that's ready. The vnu PR is not ready,I list
the TODO there.
…On Tue, Sep 3, 2019, 14:38 Maledong ***@***.***> wrote:
@XhmikosR <https://github.com/XhmikosR> :Well……I fetched the latest
version of codes and I cannot use test:html, I want to know whether this
is already added in the package.json or not. Otherwises I'll merge it into
the repository ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2423?email_source=notifications&email_token=AACVLNKGPOQNQHIEXVSUNMDQHZEDPA5CNFSM4IMOPPWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5X5BMQ#issuecomment-527421618>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACVLNIUGJKJJYGDQLZBHKDQHZEDPANCNFSM4IMOPPWA>
.
|
'use strict' | ||
|
||
module.exports = function (str) { | ||
return process.platform === 'win32' && str.replace(/\\/g, '/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The process.platform check seems inconsistent now since in summary.js I don't do the same.
There's a bug somewhere which results in backslashes in paths when building on Windows.
Maybe the name should be normalize slashes or something? I just wanted to keep it short here.
Fixes #2396