Skip to content

Commit 2a5cbac

Browse files
committed
Fix local dependant formatting - Solves #1962
1 parent d64350e commit 2a5cbac

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

modules/nextflow/src/main/groovy/nextflow/container/DockerBuilder.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class DockerBuilder extends ContainerBuilder<DockerBuilder> {
117117
result << 'run -i '
118118

119119
if( cpus )
120-
result << "--cpus ${String.format("%.1f", cpus)} "
120+
result << "--cpus ${String.format(Locale.ROOT, "%.1f", cpus)} "
121121

122122
if( cpuset ) {
123123
if( legacy )

modules/nextflow/src/main/groovy/nextflow/container/PodmanBuilder.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class PodmanBuilder extends ContainerBuilder<PodmanBuilder> {
109109
result << runOptions.join(' ') << ' '
110110

111111
if( cpus ) {
112-
result << "--cpus ${String.format("%.1f", cpus)} "
112+
result << "--cpus ${String.format(Locale.ROOT, "%.1f", cpus)} "
113113
}
114114

115115
if( memory ) {

modules/nextflow/src/main/groovy/nextflow/trace/TraceRecord.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ class TraceRecord implements Serializable {
223223
if( value == null ) return NA
224224
try {
225225
if( value instanceof Number )
226-
return String.format('%.1f%%', value.toFloat())
226+
return String.format(Locale.ROOT, '%.1f%%', value.toFloat())
227227
else {
228228
def x = value.toString().toFloat()
229-
return String.format('%.1f%%', x)
229+
return String.format(Locale.ROOT, '%.1f%%', x)
230230
}
231231

232232
}

modules/nf-commons/src/main/nextflow/util/RateUnit.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ class RateUnit {
115115
}
116116

117117
String toString() {
118-
String.format("%.2f", rate) + '/sec'
118+
String.format(Locale.ROOT, "%.2f", rate) + '/sec'
119119
}
120120
}

0 commit comments

Comments
 (0)