@@ -98,7 +98,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
9898 // copy previously fetched contents to staging dir
9999 err = dircopy .Copy (filepath .Join (d .opts .Path , contents .Path ), stagingDstPath )
100100 if err != nil {
101- return lockConfig , fmt .Errorf ("Lazy content missing. Run sync with --lazy=false to fix. '%s': %s" , d .opts .Path , err )
101+ return lockConfig , fmt .Errorf ("lazy content missing. Run sync with --lazy=false to fix. '%s': %s" , d .opts .Path , err )
102102 }
103103 continue
104104 }
@@ -114,7 +114,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
114114
115115 lock , err := gitSync .Sync (stagingDstPath , stagingDir .TempArea ())
116116 if err != nil {
117- return lockConfig , fmt .Errorf ("Syncing directory '%s' with git contents: %s" , contents .Path , err )
117+ return lockConfig , fmt .Errorf ("syncing directory '%s' with git contents: %s" , contents .Path , err )
118118 }
119119 lockDirContents .Git = & lock
120120
@@ -125,7 +125,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
125125
126126 lock , err := hgSync .Sync (stagingDstPath , stagingDir .TempArea ())
127127 if err != nil {
128- return lockConfig , fmt .Errorf ("Syncing directory '%s' with hg contents: %s" , contents .Path , err )
128+ return lockConfig , fmt .Errorf ("syncing directory '%s' with hg contents: %s" , contents .Path , err )
129129 }
130130
131131 lockDirContents .Hg = & lock
@@ -135,7 +135,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
135135
136136 lock , err := ctlhttp .NewSync (* contents .HTTP , syncOpts .RefFetcher ).Sync (stagingDstPath , stagingDir .TempArea ())
137137 if err != nil {
138- return lockConfig , fmt .Errorf ("Syncing directory '%s' with HTTP contents: %s" , contents .Path , err )
138+ return lockConfig , fmt .Errorf ("syncing directory '%s' with HTTP contents: %s" , contents .Path , err )
139139 }
140140
141141 lockDirContents .HTTP = & lock
@@ -147,7 +147,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
147147
148148 lock , err := imageSync .Sync (stagingDstPath )
149149 if err != nil {
150- return lockConfig , fmt .Errorf ("Syncing directory '%s' with image contents: %s" , contents .Path , err )
150+ return lockConfig , fmt .Errorf ("syncing directory '%s' with image contents: %s" , contents .Path , err )
151151 }
152152
153153 lockDirContents .Image = & lock
@@ -159,7 +159,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
159159
160160 lock , err := imgpkgBundleSync .Sync (stagingDstPath )
161161 if err != nil {
162- return lockConfig , fmt .Errorf ("Syncing directory '%s' with imgpkgBundle contents: %s" , contents .Path , err )
162+ return lockConfig , fmt .Errorf ("syncing directory '%s' with imgpkgBundle contents: %s" , contents .Path , err )
163163 }
164164
165165 lockDirContents .ImgpkgBundle = & lock
@@ -175,7 +175,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
175175
176176 lock , err := sync .Sync (stagingDstPath , stagingDir .TempArea ())
177177 if err != nil {
178- return lockConfig , fmt .Errorf ("Syncing directory '%s' with github release contents: %s" , contents .Path , err )
178+ return lockConfig , fmt .Errorf ("syncing directory '%s' with github release contents: %s" , contents .Path , err )
179179 }
180180
181181 lockDirContents .GithubRelease = & lock
@@ -188,7 +188,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
188188
189189 lock , err := helmChartSync .Sync (stagingDstPath , stagingDir .TempArea ())
190190 if err != nil {
191- return lockConfig , fmt .Errorf ("Syncing directory '%s' with helm chart contents: %s" , contents .Path , err )
191+ return lockConfig , fmt .Errorf ("syncing directory '%s' with helm chart contents: %s" , contents .Path , err )
192192 }
193193 lockDirContents .HelmChart = & lock
194194
@@ -199,7 +199,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
199199
200200 err := os .Rename (srcPath , stagingDstPath )
201201 if err != nil {
202- return lockConfig , fmt .Errorf ("Moving directory '%s' to staging dir: %s" , srcPath , err )
202+ return lockConfig , fmt .Errorf ("moving directory '%s' to staging dir: %s" , srcPath , err )
203203 }
204204
205205 lockDirContents .Manual = & ctlconf.LockDirectoryContentsManual {}
@@ -211,7 +211,7 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
211211
212212 err := dircopy .Copy (contents .Directory .Path , stagingDstPath )
213213 if err != nil {
214- return lockConfig , fmt .Errorf ("Copying another directory contents into directory '%s': %s" , contents .Path , err )
214+ return lockConfig , fmt .Errorf ("copying another directory contents into directory '%s': %s" , contents .Path , err )
215215 }
216216
217217 lockDirContents .Directory = & ctlconf.LockDirectoryContentsDirectory {}
@@ -221,33 +221,33 @@ func (d *Directory) Sync(syncOpts SyncOpts) (ctlconf.LockDirectory, error) {
221221
222222 lock , err := ctlinl .NewSync (* contents .Inline , syncOpts .RefFetcher ).Sync (stagingDstPath )
223223 if err != nil {
224- return lockConfig , fmt .Errorf ("Syncing directory '%s' with inline contents: %s" , contents .Path , err )
224+ return lockConfig , fmt .Errorf ("syncing directory '%s' with inline contents: %s" , contents .Path , err )
225225 }
226226
227227 lockDirContents .Inline = & lock
228228
229229 default :
230- return lockConfig , fmt .Errorf ("Unknown contents type for directory '%s'" , contents .Path )
230+ return lockConfig , fmt .Errorf ("unknown contents type for directory '%s'" , contents .Path )
231231 }
232232
233233 if ! skipFileFilter {
234234 err = FileFilter {contents }.Apply (stagingDstPath )
235235 if err != nil {
236- return lockConfig , fmt .Errorf ("Filtering paths in directory '%s': %s" , contents .Path , err )
236+ return lockConfig , fmt .Errorf ("filtering paths in directory '%s': %s" , contents .Path , err )
237237 }
238238 }
239239
240240 if ! skipNewRootPath && len (contents .NewRootPath ) > 0 {
241241 err = NewSubPath (contents .NewRootPath ).Extract (stagingDstPath , stagingDstPath , stagingDir .TempArea ())
242242 if err != nil {
243- return lockConfig , fmt .Errorf ("Changing to new root path '%s': %s" , contents .Path , err )
243+ return lockConfig , fmt .Errorf ("changing to new root path '%s': %s" , contents .Path , err )
244244 }
245245 }
246246
247247 // Copy files from current source if values are supposed to be ignored
248248 err = stagingDir .CopyExistingFiles (d .opts .Path , stagingDstPath , contents .IgnorePaths )
249249 if err != nil {
250- return lockConfig , fmt .Errorf ("Copying existing content to staging '%s': %s" , d .opts .Path , err )
250+ return lockConfig , fmt .Errorf ("copying existing content to staging '%s': %s" , d .opts .Path , err )
251251 }
252252
253253 // after everything else is done, ensure the inner dir's access perms are set
0 commit comments