File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,10 @@ const linkTarget = "__target__"
1414const link = "__link__"
1515
1616func supportsHardLinks (path string ) (supported bool ) {
17- logging .Debug ("Determining if hard links are supported for drive associated with '%s'" , path )
1817 defer func () {
19- log := "Yes they are"
2018 if ! supported {
21- log = "No they are not"
19+ logging . Debug ( "Enforcing deployment via copy, as hardlinks are not supported" )
2220 }
23- logging .Debug (log )
2421 }()
2522
2623 target := filepath .Join (path , linkTarget )
Original file line number Diff line number Diff line change @@ -465,21 +465,19 @@ func (s *setup) install(id strfmt.UUID) (rerr error) {
465465 return errs .Wrap (err , "Could not get env" )
466466 }
467467
468- if envDef .NeedsTransforms () {
468+ if envDef .NeedsTransforms () || ! s . supportsHardLinks {
469469 if err := s .depot .DeployViaCopy (id , envDef .InstallDir , s .path ); err != nil {
470470 return errs .Wrap (err , "Could not deploy artifact via copy" )
471471 }
472- if err := envDef .ApplyFileTransforms (s .path ); err != nil {
473- return errs .Wrap (err , "Could not apply env transforms" )
472+ if s .supportsHardLinks {
473+ if err := envDef .ApplyFileTransforms (s .path ); err != nil {
474+ return errs .Wrap (err , "Could not apply env transforms" )
475+ }
474476 }
475- } else if s . supportsHardLinks {
477+ } else {
476478 if err := s .depot .DeployViaLink (id , envDef .InstallDir , s .path ); err != nil {
477479 return errs .Wrap (err , "Could not deploy artifact via link" )
478480 }
479- } else {
480- if err := s .depot .DeployViaCopy (id , envDef .InstallDir , s .path ); err != nil {
481- return errs .Wrap (err , "Could not deploy artifact via copy" )
482- }
483481 }
484482
485483 return nil
You can’t perform that action at this time.
0 commit comments