Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isPcr check failing when running in a container due to grep -P #22

Closed
DarianHole opened this issue Oct 24, 2024 · 2 comments
Closed

isPcr check failing when running in a container due to grep -P #22

DarianHole opened this issue Oct 24, 2024 · 2 comments

Comments

@DarianHole
Copy link

Hi,

The isPcr check isPcr 2>&1 | head -1 | grep -Po "(?<=v )\S+" is failing when running in the https://depot.galaxyproject.org/singularity/el_gato:1.20.1--py311h7e72e81_0 singularity container

From testing, the issue appears to be that the container doesn't support the -P perl-extended regex flag used. Are you able to adjust it to accommodate that restriction? I had grep -o "v [0-9]\+x[0-9]\+" | sed "s/v //" and that seems to have worked in its place but it isn't as elegant a statement

Thanks,
Darian

@Alan-Collins
Copy link
Contributor

Hi Darian,

Thanks for raising this issue! it's hard to beat the elegance of PCRE lookarounds, but it seems the singularity container version of grep supports extended regex so I change the command to isPcr 2>&1 | head -1 | grep -Eo "v \S+" | cut -d" " -f2 as that seemed simplest. We'll include this change in our next release.

Thanks!
Alan

@DarianHole
Copy link
Author

Thanks Alan! That is very much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants