We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91a29b2 commit c6fc340Copy full SHA for c6fc340
shared/src/main/kotlin/org/javacs/kt/classpath/ShellClassPathResolver.kt
@@ -37,6 +37,13 @@ internal class ShellClassPathResolver(
37
/** Create a shell resolver if a file is a pom. */
38
fun maybeCreate(file: Path): ShellClassPathResolver? =
39
file.takeIf { scriptNames.any { name -> scriptExtensions.any { file.endsWith("$name$it") } } }
40
+ ?.takeIf {
41
+ val isExecutable = Files.isExecutable(it)
42
+ if (!isExecutable) {
43
+ LOG.warn("Found classpath script $it that is NOT executable and therefore cannot be used. Perhaps you'd want to chmod +x it?")
44
+ }
45
+ isExecutable
46
47
?.let { ShellClassPathResolver(it) }
48
49
/** The root directory for config files. */
0 commit comments