sketch: eval symlinks in pwd on startup
Fixes #205
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s14259a0fe01511d1k
diff --git a/cmd/sketch/main.go b/cmd/sketch/main.go
index bd0e088..7e9a6d0 100644
--- a/cmd/sketch/main.go
+++ b/cmd/sketch/main.go
@@ -442,6 +442,12 @@
return fmt.Errorf("sketch: cannot determine current working directory: %v", err)
}
+ // Resolve any symlinks in the working directory path
+ cwd, err = filepath.EvalSymlinks(cwd)
+ if err != nil {
+ return fmt.Errorf("sketch: cannot resolve working directory symlinks: %v", err)
+ }
+
// Configure and launch the container
config := dockerimg.ContainerConfig{
SessionID: flags.sessionID,