Skip to content

Commit

Permalink
Fixing issue if filepath consists of more than one dot (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianSchon authored Aug 15, 2024
1 parent c85b3ba commit 84226d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/runtime/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ func (r *NodeRuntime) Match(runtime string) bool {

func (r *NodeRuntime) getFile(input *BuildInput) (string, bool) {
dir := filepath.Dir(input.Warp.Handler)
base := strings.Split(filepath.Base(input.Warp.Handler), ".")[0]
fileSplit := strings.Split(filepath.Base(input.Warp.Handler), ".")
base := strings.Join(fileSplit[:len(fileSplit)-1], ".")
for _, ext := range NODE_EXTENSIONS {
file := filepath.Join(input.Project.PathRoot(), dir, base+ext)
if _, err := os.Stat(file); err == nil {
Expand Down

0 comments on commit 84226d1

Please sign in to comment.