File tree Expand file tree Collapse file tree 2 files changed +1
-22
lines changed
orchestrator/internal/cfg Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ type BuilderConfig struct {
3131 NetworkConfig network.Config
3232}
3333
34+ // makePathsAbsolute avoids some complexities with symlinks and relative paths
3435func makePathsAbsolute (c * BuilderConfig ) error {
3536 for _ , item := range []* string {
3637 & c .DefaultCachePath ,
Original file line number Diff line number Diff line change 11package utils
22
33import (
4- "fmt"
54 "os"
6- "path/filepath"
75)
86
97func SymlinkForce (oldname , newname string ) error {
@@ -12,23 +10,3 @@ func SymlinkForce(oldname, newname string) error {
1210
1311 return os .Symlink (oldname , newname )
1412}
15-
16- func AbsSymlink (oldname , newname string ) error {
17- var err error
18-
19- if ! filepath .IsAbs (oldname ) {
20- oldname , err = filepath .Abs (oldname )
21- if err != nil {
22- return fmt .Errorf ("failed to get absolute path of old path: %w" , err )
23- }
24- }
25-
26- if ! filepath .IsAbs (newname ) {
27- newname , err = filepath .Abs (newname )
28- if err != nil {
29- return fmt .Errorf ("failed to get absolute path of new path: %w" , err )
30- }
31- }
32-
33- return os .Symlink (oldname , newname )
34- }
You can’t perform that action at this time.
0 commit comments