Skip to content

Commit

Permalink
bug(apps): use absolute path for run command (#269)
Browse files Browse the repository at this point in the history
* bug(apps): use absolute path for run command
  • Loading branch information
janelletavares authored Mar 7, 2022
1 parent 5817de5 commit 661f382
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/meroxa/root/apps/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package apps
import (
"context"
"fmt"
"path/filepath"

"github.com/meroxa/cli/cmd/meroxa/builder"
turbineCLI "github.com/meroxa/cli/cmd/meroxa/turbine_cli"
Expand Down Expand Up @@ -68,6 +69,13 @@ func (r *Run) Flags() []builder.Flag {

func (r *Run) Execute(ctx context.Context) error {
r.path = turbineCLI.GetPath(r.flags.Path)
if r.path == "." || r.path == "" {
var err error
r.path, err = filepath.Abs(".")
if err != nil {
return err
}
}
lang, err := turbineCLI.GetLang(r.flags.Lang, r.path)
if err != nil {
return err
Expand Down

0 comments on commit 661f382

Please sign in to comment.