补丁程序失败-没有此类文件或目录,但文件存在并且实际应用了补丁程序

问题描述

我从github提交创建了一个补丁。当我运行补丁时(git apply patch / composer / github-25479-json-fields-support.patch )失败并说

error: Setup/Declaration/Schema/etc/schema.xsd: No such file or directory

这是失败的地方:

diff --git a/Setup/Declaration/Schema/etc/schema.xsd b/Setup/Declaration/Schema/etc/schema.xsd
index e3c54413f810..bb9136d8a9ae 100644
--- a/Setup/Declaration/Schema/etc/schema.xsd
+++ b/Setup/Declaration/Schema/etc/schema.xsd
@@ -20,6 +20,7 @@
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/texts/longtext.xsd" />
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/texts/mediumtext.xsd" />
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/texts/varchar.xsd" />
+    <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/texts/json.xsd" />
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/binaries/blob.xsd" />
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/binaries/mediumblob.xsd" />
     <xs:include schemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/types/binaries/longblob.xsd" />

但是,该文件确实存在,具有正确的权限,并且实际上添加了新行。但仍然失败。

补丁中的所有其他内容似乎也适用,创建了新文件,等等。但是在构建时失败。

file modified

有什么想法吗?

文件实际上在上面的代码之后,并且也已创建。

file created with code later in patch

Before & After

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)