1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-14 05:33:09 +00:00

Merge pull request #357 from mahesh-panchal/uppmax-hostname-fix

Execute sinfo with bash shell
This commit is contained in:
Phil Ewels 2022-03-25 15:31:09 +01:00 committed by GitHub
commit 1f872aea87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ singularity {
def hostname = "r1" def hostname = "r1"
try { try {
hostname = "sinfo --local -N -h | grep -m 1 -F -v CLUSTER: | cut -f1 -d' ' ".execute().text.trim() hostname = ['/bin/bash', '-c', 'sinfo --local -N -h | grep -m 1 -F -v CLUSTER: | cut -f1 -d" "'].execute().text.trim()
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham") System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham")
} }