App-Rak
App-Rak copied to clipboard
rak does not search in docker container
Hi! I am not sure if this is a Rak or Rakudo or SparkyCI + Docker issue, my feeling is that it all started from #5 , anyway now when SparkyCI logs improved (imho) , it's easier to make a sense of it. Let's consider a simple example of creating file containing foo
and doing a search with rak foo
in cwd:
[rak-count-only]
[repository] - index updated from http://sparrowhub.io/repo//api/v1/index
[task run: task.bash - .tomty/tasks/rak-count-only]
[dump code: task.bash]
[1] set -e
[2]
[3] cd $cache_dir
[4]
[5] rak --version
[6]
[7] echo foo > file.txt
[8] echo foo > file2.txt
[9] echo foo >> file2.txt
[10] echo foo > file3.txt
[11]
[12] rak foo --count-only
[13]
[14] rak foo --files-with-matches --count-only
[15]
[16]
[task stdout]
rak - provided by App::Rak 0.0.98, running Raku 6.d with Rakudo 2022.07.
No files with matches
No files with matches
[task check]
stdout match (s) <4 matches in 3 files> False
stdout match (s) <3 files with matches> False
=================
TASK CHECK FAIL
So for some reasons rak just says "No files with matches", even though file is here, interesting? What makes thing more harder that the issue is only reproduced by on SparkyCI - see full log as en example - https://ci.sparrowhub.io/report/1224 , most of failure (excluding git related) are due to rak just does not see files in cwd, or it looks up at different location . I have not digged into rak code yet, but like a guess, maybe it something where rak relies on some ENV vars, which values are not guaranteed for some (docker based) none standard environments ?
Just a guess. And HTH
Alexey