Skip to content

Commit 2ce6165

Browse files
committed
dot is now included in the extension
1 parent 54051fb commit 2ce6165

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/scala/io/viash/config/Config.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,15 +564,15 @@ object Config extends Logging {
564564
val configUriStr = configUri.toString
565565

566566
// get extension
567-
val extension = configUriStr.substring(configUriStr.lastIndexOf(".") + 1).toLowerCase()
567+
val extension = configUriStr.substring(configUriStr.lastIndexOf(".")).toLowerCase()
568568

569569
// get basename
570570
val basenameRegex = ".*/".r
571571
val basename = basenameRegex.replaceFirstIn(configUriStr, "")
572572

573573
// detect whether a script (with joined header) was passed or a joined yaml
574574
// using the extension
575-
if ((extension == "yml" || extension == "yaml") && configStr.contains("name:")) {
575+
if ((extension == ".yml" || extension == ".yaml") && configStr.contains("name:")) {
576576
(configStr, None)
577577
} else if (Script.extensions.contains(extension)) {
578578
// detect scripting language from extension

0 commit comments

Comments
 (0)