我开发了一个包,我想与工作中的同事分享。
我有一个网络驱动器,在其中创建了如下所示的本地存储库结构:
MyRepo
\__bin
\__windows
\__contrib
\__src
\__contrib
所有文件夹都是空的。
因此,我使用“构建/更多/构建源包”菜单在 Windows 上使用 RStudio 构建了我的包,该菜单创建了一个 tar.gz 文件。
然后我尝试了:
drat::insertPackage("../myPkg_0.0.0.9000.tar.gz",
repodir = "file://networkdrive/path/to/MyRepo",
action = "prune")
但这给了我一个错误:
Error: Directory file://networkdrive/path/to/MyRepo not found
这很奇怪,因为file.exists(//networkdrive/path/to/MyRepo)
返回 true。
好的,然后我尝试了:
drat::insertPackage("../myPkg_0.0.0.9000.tar.gz",
repodir = "//networkdrive/path/to/MyRepo",
action = "prune")
没有file:
在存储库路径中,我得到另一个错误:
tar (child): "//networkdrive/path/to/MyRepo/src/contrib/myPkg_0.0.0.9000.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/bin/tar: Child returned status 2
/usr/bin/tar: myPkg/DESCRIPTION: Not found in archive
/usr/bin/tar: Exiting with failure status due to previous errors
reading DESCRIPTION for package ‘myPkg’ failed with message:
cannot open the connection
但是当我进入“//networkdrive/path/to/MyRepo/src/contrib”文件夹时,尽管出现错误消息,我肯定可以看到已复制的 myPkg_0.0.0.9000.tar.gz 文件。
任何人都可以帮忙吗?
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 LC_NUMERIC=C LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] drat_0.1.2 tools_3.3.3 git2r_0.18.0