@@ -56,16 +56,21 @@ func (o *AppregistryBuildOptions) Complete() error {
56
56
57
57
// build a separate path for manifests and the built database, so that
58
58
// building is idempotent
59
- manifestDir , err := ioutil .TempDir ("" , "manifests-" )
60
- if err != nil {
61
- return err
59
+ if o .ManifestDir == "" {
60
+ manifestDir , err := ioutil .TempDir ("" , "manifests-" )
61
+ if err != nil {
62
+ return err
63
+ }
64
+ o .ManifestDir = manifestDir
62
65
}
63
- o .ManifestDir = manifestDir
64
- databaseDir , err := ioutil .TempDir ("" , "db-" )
65
- if err != nil {
66
- return err
66
+
67
+ if o .DatabaseDir == "" {
68
+ databaseDir , err := ioutil .TempDir ("" , "db-" )
69
+ if err != nil {
70
+ return err
71
+ }
72
+ o .DatabaseDir = databaseDir
67
73
}
68
- o .DatabaseDir = databaseDir
69
74
70
75
if o .DatabasePath == "" {
71
76
o .DatabasePath = path .Join (o .DatabaseDir , "bundles.db" )
@@ -96,6 +101,9 @@ func (c *AppregistryBuildOptions) ToOption() AppregistryBuildOption {
96
101
if c .AuthToken != "" {
97
102
o .AuthToken = c .AuthToken
98
103
}
104
+ if c .AppRegistryOrg != "" {
105
+ o .AppRegistryOrg = c .AppRegistryOrg
106
+ }
99
107
if c .AppRegistryEndpoint != "" {
100
108
o .AppRegistryEndpoint = c .AppRegistryEndpoint
101
109
}
@@ -105,6 +113,9 @@ func (c *AppregistryBuildOptions) ToOption() AppregistryBuildOption {
105
113
if c .CacheDir != "" {
106
114
o .CacheDir = c .CacheDir
107
115
}
116
+ if c .DatabaseDir != "" {
117
+ o .DatabaseDir = c .DatabaseDir
118
+ }
108
119
}
109
120
}
110
121
0 commit comments