mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Merge pull request #404 from ethauvin/master
Added test to check if kobaltw is executable (*nix only.)
This commit is contained in:
commit
2966575073
1 changed files with 8 additions and 2 deletions
|
@ -1,9 +1,10 @@
|
||||||
package com.beust.kobalt
|
package com.beust.kobalt
|
||||||
|
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.*
|
||||||
import com.beust.kobalt.misc.kobaltLog
|
|
||||||
import org.testng.annotations.Test
|
import org.testng.annotations.Test
|
||||||
import java.io.*
|
import java.io.*
|
||||||
|
import java.nio.file.Files
|
||||||
|
import java.nio.file.Paths
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.jar.*
|
import java.util.jar.*
|
||||||
|
|
||||||
|
@ -37,6 +38,11 @@ class VerifyKobaltZipTest : KobaltTest() {
|
||||||
throw KobaltException("kobaltw has wrong line endings")
|
throw KobaltException("kobaltw has wrong line endings")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (OperatingSystem.current().isWindows()) {
|
||||||
|
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
|
foundKobaltw = true
|
||||||
} else if (entry.name.endsWith(mainJarFilePath)) {
|
} else if (entry.name.endsWith(mainJarFilePath)) {
|
||||||
val ins = zipFile.getInputStream(entry)
|
val ins = zipFile.getInputStream(entry)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue