简体   繁体   English

mv:无法统计“coverage.txt”:没有这样的文件或目录

[英]mv: cannot stat 'coverage.txt': No such file or directory

I'm trying to setup Codecov in my repository.我正在尝试在我的存储库中设置 Codecov。 I'm trying to pass the Codecov reports through docker container.我正在尝试通过 docker 容器传递 Codecov 报告。

Here is my Dockerfile这是我的 Dockerfile

FROM markadams/chromium-xvfb-js:7
WORKDIR /usr/src/app
CMD npm install && \
    node_modules/.bin/ng build && \
    node_modules/.bin/ng test --watch=false && \
    node_modules/.bin/ng lint && \
    mkdir -p shared && \
    mv coverage.txt shared

The error which I get is this -我得到的错误是这个 -

mv: cannot stat 'coverage.txt': No such file or directory

You can check my repository here你可以在这里查看我的存储库

Thanks!谢谢!

If you want a file from your build directory to exist inside the image (and containers), you need to first copy the file into your image:如果您希望构建目录中的文件存在于映像(和容器)中,您需要先将该文件复制到您的映像中:

FROM markadams/chromium-xvfb-js:7
# add this next line
COPY . /usr/src/app
WORKDIR /usr/src/app
CMD npm install && \
    node_modules/.bin/ng build && \
    node_modules/.bin/ng test --watch=false && \
    node_modules/.bin/ng lint

You are moving the coverage.txt to shared.您正在将coverage.txt 移动到共享。 Looking in your repository the file coverage.txt is inside shared.查看您的存储库,文件coverage.txt 位于共享内部。

Therefor you need to do mv shared/coverage.txt shared因此你需要做mv shared/coverage.txt shared

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 mv:无法统计错误:没有此类文件或目录错误 - mv: cannot stat error : No such file or directory error mv命令移动文件但报告错误:无法统计没有这样的文件或目录 - mv command moves file but reports error: cannot stat no such file or directory 文本文件中的单引号完整路径文件不能用于循环处理 mv: cannot stat ... No such file or directory - Single quoted full path files in a text file can't do for loop processing mv: cannot stat … No such file or directory cp:无法统计…没有此类文件或目录 - cp: cannot stat … No such file or directory cp: cannot stat No such file or directory - cp: cannot stat No such file or directory 使用cp将.html文件转换为.txt。 错误:cp:无法统计“ /*.html”:没有此类文件或目录 - Convert .html file to .txt using cp | error: cp: cannot stat '/*.html': No such file or directory Shell cp:无法统计没有这样的文件或目录 - Shell cp: cannot stat no such file or directory mv:不能用非目录覆盖目录 - mv: cannot overwrite directory with non-directory Doxygen make make install错误:无法统计“示例”:没有这样的文件或目录 - Doxygen make make install Error : cannot stat ‘examples’: No such file or directory Docker Ubuntu 无法统计“keys/id_rsa”没有这样的文件或目录 - Docker Ubuntu cannot stat 'keys/id_rsa' no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM