在将它存储在GitHub操作之前,我想先清理gradle缓存。目前的相关配置如下:
- name: Turn off the Gradle Daemon
shell: bash
run: ./gradlew --stop
- name: Cleanup Gradle Cache
shell: bash
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties这个过程在Linux和MacOS X下运行得很好,但是在windows上,尽管在运行清理之前停止了Gradle Daemon,我还是得到了以下错误:
Run rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm: cannot remove '/c/Users/runneradmin/.gradle/caches/modules-2/modules-2.lock': Device or resource busy
Error: Process completed with exit code 1.是否有任何方法强制删除文件?我不在乎前后矛盾,我想要删除那个文件,仅此而已。删除必须在连续集成环境中执行,因此没有图形工具,只有Powershell或git。
https://stackoverflow.com/questions/68950823
复制相似问题