File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
modules/integration/src/test/scala/scala/cli/integration Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -230,18 +230,24 @@ object TestUtil {
230
230
.find(_._1.toLowerCase(Locale .ROOT ) == " path" )
231
231
.getOrElse((" PATH" , " " ))
232
232
if (Properties .isWin) {
233
- val script =
234
- s """ @echo off
235
- |" ${TestUtil .cs}" %*
236
- | """ .stripMargin
237
- os.write(binDir / " cs.bat" , script, createFolders = true )
233
+ val dest = binDir / " cs.bat"
234
+ if (! os.exists(dest)) {
235
+ val script =
236
+ s """ @echo off
237
+ |" ${TestUtil .cs}" %*
238
+ | """ .stripMargin
239
+ os.write(dest, script, createFolders = true )
240
+ }
238
241
}
239
242
else {
240
- val script =
241
- s """ #!/usr/bin/env bash
242
- |exec " ${TestUtil .cs}" " $$ @"
243
- | """ .stripMargin
244
- os.write(binDir / " cs" , script, " rwxr-xr-x" , createFolders = true )
243
+ val dest = binDir / " cs"
244
+ if (! os.exists(dest)) {
245
+ val script =
246
+ s """ #!/usr/bin/env bash
247
+ |exec " ${TestUtil .cs}" " $$ @"
248
+ | """ .stripMargin
249
+ os.write(dest, script, " rwxr-xr-x" , createFolders = true )
250
+ }
245
251
}
246
252
Map (pathVarName -> s " $binDir${File .pathSeparator}$currentPath" )
247
253
}
You can’t perform that action at this time.
0 commit comments