mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-22 01:00:40 +00:00
join source to current working directory
This commit is contained in:
parent
927b3c3434
commit
35eeba4167
8
main.go
8
main.go
@ -212,6 +212,14 @@ func main() {
|
|||||||
vargs.Source = "."
|
vargs.Source = "."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wd, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
vargs.Source = filepath.Join(wd, vargs.Source)
|
||||||
|
|
||||||
if strings.HasPrefix(vargs.Target, "/") {
|
if strings.HasPrefix(vargs.Target, "/") {
|
||||||
vargs.Target = vargs.Target[1:]
|
vargs.Target = vargs.Target[1:]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user