We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d7eb36 commit be311bdCopy full SHA for be311bd
internal/wrapnix/wrapper.go
@@ -145,6 +145,18 @@ func createSymlinksForSupportDirs(projectDir string) error {
145
newname := filepath.Join(projectDir, plugin.WrapperPath, dir.Name())
146
147
if err := os.Symlink(oldname, newname); err != nil {
148
+ // ignore if the symlink already exists
149
+ if errors.Is(err, os.ErrExist) {
150
+ existing, readerr := os.Readlink(newname)
151
+ if readerr != nil {
152
+ return errors.WithStack(readerr)
153
+ }
154
+ if existing == oldname {
155
+ continue
156
157
+ return errors.Errorf("symlink %s already exists and points to %s", newname, existing)
158
+
159
160
return err
161
}
162
0 commit comments