mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Added test to check if kobaltw is executable (*nix only.)
This commit is contained in:
parent
d710362af1
commit
c737fc9a00
1 changed files with 8 additions and 2 deletions
|
@ -1,9 +1,10 @@
|
|||
package com.beust.kobalt
|
||||
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.beust.kobalt.misc.kobaltLog
|
||||
import com.beust.kobalt.misc.*
|
||||
import org.testng.annotations.Test
|
||||
import java.io.*
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.util.*
|
||||
import java.util.jar.*
|
||||
|
||||
|
@ -37,6 +38,11 @@ class VerifyKobaltZipTest : KobaltTest() {
|
|||
throw KobaltException("kobaltw has wrong line endings")
|
||||
}
|
||||
}
|
||||
if (System.getProperty("os.name").contains("Windows")) {
|
||||
warn("Can't determine if kobaltw is executable under Windows")
|
||||
} else if (!Files.isExecutable(Paths.get("dist/kobaltw"))) {
|
||||
throw KobaltException("kobaltw has invalid permissions")
|
||||
}
|
||||
foundKobaltw = true
|
||||
} else if (entry.name.endsWith(mainJarFilePath)) {
|
||||
val ins = zipFile.getInputStream(entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue