@@ -198,9 +198,13 @@ func (m *Manager) parseBinaryExtensionDir(fi fs.FileInfo) (Extension, error) {
198198 remoteURL := ghrepo .GenerateRepoURL (repo , "" )
199199 ext .url = remoteURL
200200 ext .currentVersion = bm .Tag
201+ << << << < HEAD
201202 if bm .Pinned {
202203 ext .pin = bm .Tag
203204 }
205+ == == == =
206+ ext .isPinned = bm .IsPinned
207+ >> >> >> > tmp
204208 return ext , nil
205209}
206210
@@ -210,10 +214,17 @@ func (m *Manager) parseGitExtensionDir(fi fs.FileInfo) (Extension, error) {
210214 remoteUrl := m .getRemoteUrl (fi .Name ())
211215 currentVersion := m .getCurrentVersion (fi .Name ())
212216
217+ << << << < HEAD
213218 var pinnedVersion string
214219 pinPath := filepath .Join (id , fi .Name (), fmt .Sprintf (".pin-%s" , currentVersion ))
215220 if _ , err := os .Stat (pinPath ); err == nil && len (currentVersion ) > 6 {
216221 pinnedVersion = currentVersion [:7 ]
222+ == == == =
223+ var isPinned bool
224+ pinPath := filepath .Join (id , fi .Name (), fmt .Sprintf (".pin-%s" , currentVersion ))
225+ if _ , err := os .Stat (pinPath ); err == nil {
226+ isPinned = true
227+ >> >> >> > tmp
217228 }
218229
219230 return Extension {
@@ -222,7 +233,11 @@ func (m *Manager) parseGitExtensionDir(fi fs.FileInfo) (Extension, error) {
222233 isLocal : false ,
223234 currentVersion : currentVersion ,
224235 kind : GitKind ,
236+ << << << < HEAD
225237 pin : pinnedVersion ,
238+ == == == =
239+ isPinned : isPinned ,
240+ >> >> >> > tmp
226241 }, nil
227242}
228243
@@ -324,11 +339,19 @@ func (m *Manager) InstallLocal(dir string) error {
324339}
325340
326341type binManifest struct {
342+ << << << < HEAD
327343 Owner string
328344 Name string
329345 Host string
330346 Tag string
331347 Pinned bool
348+ == == == =
349+ Owner string
350+ Name string
351+ Host string
352+ Tag string
353+ IsPinned bool
354+ >> >> >> > tmp
332355 // TODO I may end up not using this; just thinking ahead to local installs
333356 Path string
334357}
@@ -400,12 +423,21 @@ func (m *Manager) installBin(repo ghrepo.Interface, target string) error {
400423 }
401424
402425 manifest := binManifest {
426+ << << << < HEAD
403427 Name: name ,
404428 Owner : repo .RepoOwner (),
405429 Host : repo .RepoHost (),
406430 Path : binPath ,
407431 Tag : r .Tag ,
408432 Pinned : isPinned ,
433+ == == == =
434+ Name : name ,
435+ Owner : repo .RepoOwner (),
436+ Host : repo .RepoHost (),
437+ Path : binPath ,
438+ Tag : r .Tag ,
439+ IsPinned : isPinned ,
440+ >> >> >> > tmp
409441 }
410442
411443 bs , err := yaml .Marshal (manifest )
@@ -469,7 +501,11 @@ func (m *Manager) installGit(repo ghrepo.Interface, target string, stdout, stder
469501 pinPath := filepath .Join (targetDir , fmt .Sprintf (".pin-%s" , commitSHA ))
470502 f , err := os .OpenFile (pinPath , os .O_WRONLY | os .O_CREATE , 0600 )
471503 if err != nil {
504+ << << << < HEAD
472505 return fmt .Errorf ("failed to create pin in directory: %w" , err )
506+ == == == =
507+ return fmt .Errorf ("failed to create pin file in directory: %w" , err )
508+ >> >> >> > tmp
473509 }
474510 return f .Close ()
475511}
@@ -533,7 +569,11 @@ func (m *Manager) upgradeExtension(ext Extension, force bool) error {
533569 if ext .isLocal {
534570 return localExtensionUpgradeError
535571 }
572+ << << << < HEAD
536573 if ext .pin != "" {
574+ == == == =
575+ if ext .IsPinned () {
576+ >> >> >> > tmp
537577 return pinnedExtensionUpgradeError
538578 }
539579 if ! ext .UpdateAvailable () {
0 commit comments