Skip to content

Commit

Permalink
fix: Only Ruby service was getting detected and other services were i…
Browse files Browse the repository at this point in the history
…gnored

Signed-off-by: Akash Nayak <akash19nayak@gmail.com>
  • Loading branch information
Akash-Nayak committed Mar 20, 2024
1 parent fd897df commit 27e5047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transformer/dockerfilegenerator/rubydockerfiletransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ func (t *RubyDockerfileGenerator) GetConfig() (transformertypes.Transformer, *en

// DirectoryDetect runs detect in each sub directory
func (t *RubyDockerfileGenerator) DirectoryDetect(dir string) (map[string][]transformertypes.Artifact, error) {
gemfilePaths, err := common.GetFilesByName(dir, []string{"Gemfile"}, nil)
gemfilePaths, err := common.GetFilesInCurrentDirectory(dir, []string{"Gemfile"}, nil)
if err != nil {
return nil, fmt.Errorf("failed to look for Gemfiles in the dir %s . Error: %q", dir, err)
}
if len(gemfilePaths) == 0 {
return nil, nil
}
rubyFiles, err := common.GetFilesByExt(dir, []string{rubyFileExt})
rubyFiles, err := common.GetFilesByExtInCurrDir(dir, []string{rubyFileExt})
if err != nil {
return nil, fmt.Errorf("failed to look for ruby files in the directory %s . Error: %q", dir, err)
}
Expand Down

0 comments on commit 27e5047

Please sign in to comment.