0
0
mirror of https://github.com/thegeeklab/wp-s3-action.git synced 2024-11-21 14:50:39 +00:00

join source to current working directory

This commit is contained in:
Nathan LaFreniere 2015-11-13 16:11:26 -08:00
parent 927b3c3434
commit 35eeba4167

View File

@ -212,6 +212,14 @@ func main() {
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, "/") {
vargs.Target = vargs.Target[1:]
}