From 0358744b468441bdb671f76767fa313c3e07e0b9 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 8 Jul 2024 13:51:39 -0300 Subject: [PATCH] Remove template correctly in Runtime.runtime_files --- TODO.md | 2 +- src/runtime.cr | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 631a702..b2ae90c 100644 --- a/TODO.md +++ b/TODO.md @@ -30,7 +30,7 @@ while keeping logging level configurable * ✅ Fix proxy reload / Make it reload on file changes * Implement `faaso help command` -* Fix `export examples/hello_crystal` it has a `template/` +* ✅ Fix `export examples/hello_crystal` it has a `template/` * ✅ Implement zero-downtime rollout (`faaso deploy`) * Cleanup `tmp/` after use unless `DEBUG` is set * `faaso scale` remote is broken diff --git a/src/runtime.cr b/src/runtime.cr index af6023c..d8b2259 100644 --- a/src/runtime.cr +++ b/src/runtime.cr @@ -23,7 +23,9 @@ module Runtime if @@known.includes? "./runtimes/#{runtime}" Log.info { "Using known runtime #{runtime}" } runtime_base = "./runtimes/#{runtime}/" - runtime_files = @@filelist.select(&.starts_with?(runtime_base)) + runtime_files = @@filelist.select(&.starts_with?(runtime_base)).map { |path| + Path[path].normalize.to_s + } elsif File.exists? runtime Log.info { "Using directory #{runtime} as runtime" } runtime_base = "#{runtime}"