当前位置 : 主页 > 网络编程 > 其它编程 >

Fix@tinacms/apigit`/show/:path`endpoint

来源:互联网 收集:自由互联 发布时间:2023-07-02
PossiblefixforseveralreportsTherearethreepiecestothisbug.First, Possible fix for several reports There are three pieces to this bug. First, on windows path's can contain forward slashes, ordouble back slashes. For example 1data/author.json o
PossiblefixforseveralreportsTherearethreepiecestothisbug.First,

Possible fix for several reports

There are three pieces to this bug.

First, on windows path's can contain forward slashes, ordouble back slashes. For example

1data/author.json

or

1data\\author.json

Second, Node's

1path.join

returns the second on Windows.

Third, the

1git show

command behaves oddly with the former:

1git show HEAD:data/author.json

Returns the contents of the file

1git show HEAD:data/dne.json

Throws an error, and finally

1git show HEAD:data\\author.json

returns an empty string.

This very well may be a bug in Git. I'm not sure.

该提问来源于开源项目:tinacms/tinacms

I wonder if there's an ESLint option for that?

   

网友评论