Skip to content

Commit

Permalink
runner/v2: use absolute path for workdir internally
Browse files Browse the repository at this point in the history
  • Loading branch information
ucirello committed Aug 31, 2024
1 parent f3757e0 commit 2386039
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import (
"net/url"
"os"
"os/signal"
"path/filepath"
"runtime/debug"
"strings"
"sync"
Expand Down Expand Up @@ -252,6 +253,10 @@ func mainRunner(c *cli.Context) error {
}
s.WorkDir = wd
}
s.WorkDir, err = filepath.Abs(s.WorkDir)
if err != nil {
return fmt.Errorf("cannot find absolute path for workdir: %v", err)
}
if _, err := os.Stat(s.WorkDir); err != nil {
return fmt.Errorf("cannot find work directory: %w", err)
}
Expand Down

0 comments on commit 2386039

Please sign in to comment.