mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
refactor: minor improvements to setCurrentDir
This commit is contained in:
committed by
Andrey Nering
parent
ba299aa71f
commit
d1d312f396
@@ -311,13 +311,13 @@ func Exists(path string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
if fi.Mode().IsRegular() {
|
||||
return path, nil
|
||||
return filepath.Abs(path)
|
||||
}
|
||||
|
||||
for _, n := range defaultTaskfiles {
|
||||
fpath := filepathext.SmartJoin(path, n)
|
||||
if _, err := os.Stat(fpath); err == nil {
|
||||
return fpath, nil
|
||||
return filepath.Abs(fpath)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user