master
kingxt 4 years ago committed by GitHub
parent a0030b8f45
commit f919bc6713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,7 @@ const (
type Plugin struct { type Plugin struct {
Api *spec.ApiSpec Api *spec.ApiSpec
ApiFilePath string
Style string Style string
Dir string Dir string
} }
@ -86,6 +87,12 @@ func prepareArgs(c *cli.Context) ([]byte, error) {
transferData.Api = api transferData.Api = api
} }
absApiFilePath, err := filepath.Abs(apiPath)
if err != nil {
return nil, err
}
transferData.ApiFilePath = absApiFilePath
dirAbs, err := filepath.Abs(c.String("dir")) dirAbs, err := filepath.Abs(c.String("dir"))
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save